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');
});
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire