Securing your API - RTLer/laravel-oauth2-server GitHub Wiki

you can secure your routes with oauth middleware

  • you can set scopes like this 'middleware' => 'oauth:scope1,scope2,...'
Route::get('admin/profile', ['middleware' => 'oauth', function () {
    //
}]);