Reputation: 2139
I need to separate the backend and frontend routes. To do so I created two different files in \routes
directory for backend and frontend. In the RouteServiceProvider.php
I want to know who the current user is in order to load its routes. I tried this
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
//
}
protected function mapWebRoutes()
{
Route::middleware('auth')
->namespace($this->namespace)
->group(base_path('routes/backend.php'));
}
To load the route for middleware auth
but it is not working. How can I do that?
Upvotes: 0
Views: 460
Reputation: 11
Add this file to your config folder https://github.com/laravel/laravel/blob/develop/config/logging.php
and add this to your .env file LOG_CHANNEL=stack
PHP artisan config:cache
Upvotes: 1