-
Notifications
You must be signed in to change notification settings - Fork 25
/
web.php
27 lines (22 loc) · 774 Bytes
/
web.php
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
<?php
use App\Http\Controllers\ArticleController;
use App\Http\Controllers\DictionaryController;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
if (config('app.demo_mode', false)) {
return redirect('/admin');
}
return view('home');
})->name('home');
Route::controller(ArticleController::class)
->name('articles.')
->prefix('articles')->group(function () {
Route::get('/', 'index')->name('index');
Route::get('/{article:slug}', 'show')->name('show');
});
Route::controller(DictionaryController::class)
->name('dictionaries.')
->prefix('dictionaries')->group(function () {
Route::get('/', 'index')->name('index');
Route::get('/{dictionary:slug}', 'show')->name('show');
});