欢迎各位兄弟 发布技术文章
这里的技术是共享的
'auth' => [ |
@karandatwani92@Sogl@bendparker
|
app('Dingo\Api\Auth\Auth')->extend('basic', function ($app) {
return new Dingo\Api\Auth\Provider\Basic($app['auth'], 'email');
});
// example of protected route
$api->get('protected', ['middleware' => ['api.auth'], function () {
return \App\Employee::all();
}]);
public function boot()
{
$this->app('Dingo\Api\Auth\Auth')->extend('basic', function ($app) {
return new Dingo\Api\Auth\Provider\Basic($app['auth'], 'email');
});
}
'auth' => [
'basic' => function ($app) {
return new Dingo\Api\Auth\Provider\Basic($app['auth']);
}
],
"message": "Call to undefined method Closure::authenticate()",
"code": 1,
"status_code": 500,
|
'auth' => [ |
karandatwani92 @@ Sogl“bendparker
|
Soglcommented on 5 Oct 2016
https://github.com/dingo/api/wiki/Authentication
#694
App\Providers\AppServiceProvider.php
config/api.php