-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb.php
More file actions
28 lines (23 loc) · 626 Bytes
/
web.php
File metadata and controls
28 lines (23 loc) · 626 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
use App\Http\Controllers\LocaleController;
/*
* Global Routes
*
* Routes that are used between both frontend and backend.
*/
// Switch between the included languages
Route::get('lang/{lang}', [LocaleController::class, 'change'])->name('locale.change');
/*
* Frontend Routes
*/
Route::group(['as' => 'frontend.'], function () {
includeRouteFiles(__DIR__.'/frontend/');
});
/*
* Backend Routes
*
* These routes can only be accessed by users with type `admin`
*/
Route::group(['prefix' => 'admin', 'as' => 'admin.', 'middleware' => 'admin'], function () {
includeRouteFiles(__DIR__.'/backend/');
});