32 lines
556 B
PHP
32 lines
556 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class ProtectedRouteProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->loadCustomRoutes();
|
|
}
|
|
|
|
protected function loadCustomRoutes(): void
|
|
{
|
|
Route::middleware(['web', 'auth'])
|
|
->group(base_path('routes/protected.php'));
|
|
}
|
|
}
|