dimanche 30 décembre 2018

laravel 5.3 Missing argument 2 for Illuminate\Routing\Router::middleware()

Missing argument 2 for Illuminate\Routing\Router::middleware()

api.php

Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); });

RouteServiceProvider.php

protected function mapApiRoutes()
{
Route::group([
    'middleware' => ['api', 'auth:api'],
    'namespace' => $this->namespace,
    'prefix' => 'api',
], function ($router) {
    require base_path('routes/api.php');
});
}



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2rYCDeC
via IFTTT

Aucun commentaire:

Enregistrer un commentaire