This error has come up when I use postman with the api.php file.
Using the documentation example of Laravel 5.4 here is the code in the file.
Route::get('/user', function (Request $request) {
return $request->user() ; })->middleware('auth:api');
In postman I have these settings.
It seems really unusual to have these errors as HasApiTokens are in the relevant Models, so what is the problem?
i solved this by adding "use HasApiTokens, Notifiable;" in App/User.php