@dusterio maybe in the readme you should say that User model should implements:
use Laravel\Passport\HasApiTokens;
use Illuminate\Auth\Authenticatable;
class User extends Model
{
use Authenticatable, HasApiTokens;
For example in the laraverl docs they say that users model should do this:
use Laravel\Passport\HasApiTokens;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use HasApiTokens, Notifiable;
but using this class we get for example:
Fatal error: Class 'Illuminate\Foundation\Auth\User' not found in D:\XamppAmbient\htdocs\RestApi\app\User.php on line
not using Authenticatable trait we get:
lumen.ERROR: exception 'BadMethodCallException' with message 'Call to undefined method Illuminate\Database\Query\Builder::getAuthIdentifier()' in D:\XamppAmbient\htdocs\RestApi\vendor\illuminate\database\Query\Builder.php:2448
@dusterio maybe in the readme you should say that User model should implements:
For example in the laraverl docs they say that users model should do this:
but using this class we get for example:
Fatal error: Class 'Illuminate\Foundation\Auth\User' not found in D:\XamppAmbient\htdocs\RestApi\app\User.php on line
not using Authenticatable trait we get:
lumen.ERROR: exception 'BadMethodCallException' with message 'Call to undefined method Illuminate\Database\Query\Builder::getAuthIdentifier()' in D:\XamppAmbient\htdocs\RestApi\vendor\illuminate\database\Query\Builder.php:2448
what do you think?