i have a function where
public function index(){
$users = User::doesntHave('roles')->latest()->paginate()->except(Auth::id());
return UsersResource::collection($users);
}
when i dd the Auth::id()
it returns null even if I declared the auth facade on my controller
use Illuminate\Support\Facades\Auth;
this is my route which is stored inside api.php
Route::resource('users','Users\AdminUsersController')->except([
'create', 'edit'
]);
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2BVUHOu
via IFTTT
Aucun commentaire:
Enregistrer un commentaire