File manager - Edit - /home/linknsbh/restawy.online/app/Providers/RouteServiceProvider.php
Back
<?php namespace App\Providers; use Illuminate\Support\Facades\Route; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; class RouteServiceProvider extends ServiceProvider { /** * This namespace is applied to your controller routes. * * In addition, it is set as the URL generator's root namespace. * * @var string */ protected $namespace = 'App\Http\Controllers'; /** * The path to the "home" route for your application. * * @var string */ public const HOME = '/home'; public const ADMIN = '/admin/dashboard'; public const USER_DASHBOARD = '/user/dashboard'; /** * Define your route model bindings, pattern filters, etc. * * @return void */ public function boot(): void { Route::pattern('domain', '[a-z0-9.\-]+'); parent::boot(); } /** * Define the routes for the application. * * @return void */ public function map(): void { $this->mapApiRoutes(); $this->mapAdminRoutes(); $this->mapUserRoutes(); $this->mapWebRoutes(); $this->mapUserFrontRoutes(); } /** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. * * @return void */ protected function mapWebRoutes(): void { Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/web.php')); } /** * Define the "api" routes for the application. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes(): void { Route::prefix('api') ->middleware('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); } /** * Define the "admin" routes for the application. * * These routes are typically stateless. * * @return void */ protected function mapAdminRoutes(): void { Route::prefix('admin') ->middleware(['web','admin','auth:admin']) ->namespace($this->namespace) ->group(base_path('routes/admin.php')); } /** * Define the "user" routes for the application. * * These routes are typically stateless. * * @return void */ protected function mapUserRoutes(): void { Route::prefix('user') ->middleware(['web','auth:web','userstatus']) ->namespace($this->namespace) ->group(base_path('routes/user.php')); } /** * Define the "user" routes for the application. * * These routes are typically stateless. * * @return void */ protected function mapUserFrontRoutes(): void { Route::prefix('{domain}') ->middleware(['web','auth:web','userstatus']) ->namespace($this->namespace) ->group(base_path('routes/user-front.php')); } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.99 |
proxy
|
phpinfo
|
Settings