mardi 26 septembre 2017

Laravel 5.5 api authorization with APi Token

i am trying to authenticate our user using the APi token,

Here is my code config/auth.php code

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

        'api' => [
            'driver' => 'token',
            'provider' => 'users',
        ],
    ],

My Api.php is like this

Route::group(['middleware' => ['subdomain_setup','auth::api'],'prefix'=>'v1'], function () {
    Route::get('getCoupons','Api\CouponAPI@getCoupons');
});

Now i an getting this error while accessing my api URL

Column not found: 1054 Unknown column 'api_token' in 'where clause' (SQL: select * from `users` where `api_token` = 



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2hwD61Y
via IFTTT

Aucun commentaire:

Enregistrer un commentaire