lpj/app/Providers/RouteServiceProvider.php

54 lines
1.3 KiB
PHP
Raw Normal View History

2024-08-07 03:09:43 +00:00
<?php
2024-08-13 04:54:42 +00:00
namespace Modules\Lpj\Providers;
2024-08-07 03:09:43 +00:00
2024-08-13 04:54:42 +00:00
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Route;
2024-08-07 03:09:43 +00:00
2024-08-13 04:54:42 +00:00
class RouteServiceProvider extends ServiceProvider
2024-08-07 03:09:43 +00:00
{
2024-08-13 04:54:42 +00:00
/**
* Called before routes are registered.
*
* Register any model bindings or pattern based filters.
*/
public function boot()
: void
{
parent::boot();
}
2024-08-07 03:09:43 +00:00
2024-08-13 04:54:42 +00:00
/**
* Define the routes for the application.
*/
public function map()
: void
{
$this->mapApiRoutes();
2024-08-07 03:09:43 +00:00
2024-08-13 04:54:42 +00:00
$this->mapWebRoutes();
}
2024-08-07 03:09:43 +00:00
2024-08-13 04:54:42 +00:00
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*/
protected function mapApiRoutes()
: void
{
Route::middleware('api')->prefix('api')->name('api.')->group(module_path('Lpj', '/routes/api.php'));
}
2024-08-07 03:09:43 +00:00
2024-08-13 04:54:42 +00:00
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*/
protected function mapWebRoutes()
: void
{
Route::middleware('web')->group(module_path('Lpj', '/routes/web.php'));
}
2024-08-07 03:09:43 +00:00
}