mardi 28 juillet 2020

Middleware not working when created route from routeserviceprovider in laravel

Create the Route file from the Route Service Provide and assign the middleware "admin.auth" and this middlware working in the web.php giving the basic information of the admin user but from the custom.php it is not checking the auth. How can admin.auth will work from route service provider

 protected function mapWebRoutes2()
    {
        Route::group([
            'namespace' => $this->namespace,
            'prefix' => 'custom',
            'middleware' => 'admin.auth'
        ], function ($router) {

            require base_path('routes/custom.php');
        });
    }


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire