I'm implementing a secure REST Api with Dingo
. I was able to return a token
after POST username and password. Now I'm trying to access a secure end point. Here is the API code.
$api = app('Dingo\Api\Routing\Router');
$api->version('v1', function ($api){
$api->post('authenticate', 'App\Http\Controllers\APIController@authenticate');
});
$api->version('v1', ['middleware' => 'api.auth'], function ($api){
$api->get('drivers', 'App\Http\Controllers\APIController@getDrivers');
});
I'm using postman and when I try to access /drivers
, it gives following error.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire