This should fix the use of hard coded \App\User references, and other namespaces.
In our project, we have moved model files, so the namespace of User class is not the default one.
Auth::user() return a class which implements Illuminate\Contracts\Auth\Authenticatable, and it's all we need here, to get the id with getAuthIdentifier() method.
This should fix the use of hard coded
\App\User
references, and other namespaces. In our project, we have moved model files, so the namespace of User class is not the default one.Auth::user()
return a class which implementsIlluminate\Contracts\Auth\Authenticatable
, and it's all we need here, to get the id withgetAuthIdentifier()
method.