This code worked in laravel 5.2 But don't work in laravel 5.3. I have in RouteServiceProvider:
\Route::model('users', \App\User::class, function ($value) {
return User::where('name', $value)
->first();
});
In my blades I ask for action:
'<a href=""></a>'
And in my UserController
public function show($user)
{
return view('users.user.show', compact('user'));
}
And now $user is only Auth::user()->nameFor example 'qwerty'. But not the object of class User how it has been earlier. What can be a problem?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire