[Error] Column not found: 1054 Unknown column 'api_token' in 'where clause' (SQL: select * from (ok)

https://stackoverflow.com/questions/58644716/laravel-5-8-and-passport-getting-sqlstate42s22-column-not-found-1054-unknown


I have faced the same problem. And I am using Laravel Passport. It all about configuration. got to config/auth.php and change driver name of api array to passport within the guards array

'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'users',
    ],

    'api' => [
        'driver' => 'passport',//instead of token 
        'provider' => 'users',
        'hash' => false,
    ],
],

Last updated