Files
productalert/routes/web.php
2023-07-27 02:18:38 +08:00

44 lines
1.7 KiB
PHP

<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
Route::get('test', function() {
return App\Models\Post::first()->body;
});
Route::get('/', [App\Http\Controllers\Front\HomeController::class, 'index'])->name('home');
Route::get('/{country}', [App\Http\Controllers\Front\HomeController::class, 'country'])->name('home.country');
Route::get('/{country}/posts', [App\Http\Controllers\Front\HomeController::class, 'all'])->name('home.country.posts');
Route::get('/{country}/posts/{post}', [App\Http\Controllers\Front\HomeController::class, 'post'])->name('home.country.post');
Route::get('/{country}/{category}', [App\Http\Controllers\Front\HomeController::class, 'countryCategory'])->name('home.country.category');
Auth::routes();
Route::prefix('admin')->middleware('auth')->group(function () {
Route::get('/', [App\Http\Controllers\Admin\DashboardController::class, 'index'])->name('dashboard');
Route::view('about', 'admin.about')->name('about');
Route::get('users', [\App\Http\Controllers\Admin\UserController::class, 'index'])->name('users.index');
Route::get('profile', [\App\Http\Controllers\Admin\ProfileController::class, 'show'])->name('profile.show');
Route::put('profile', [\App\Http\Controllers\Admin\ProfileController::class, 'update'])->name('profile.update');
});