blog/routes/web.php

34 lines
1.1 KiB
PHP
Raw Normal View History

2024-02-19 11:07:04 +01:00
<?php
use App\Http\Controllers\AdminController;
2024-03-04 17:32:45 +01:00
use App\Http\Controllers\BlogController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\PhotoController;
use App\Http\Controllers\PostController;
2024-02-19 11:07:04 +01:00
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('/', [HomeController::class, 'index'])->name('home');
2024-02-19 11:07:04 +01:00
Auth::routes();
2024-02-19 11:07:04 +01:00
Route::get('/', [HomeController::class, 'index'])->name('home');
Route::get('/photos', [PhotoController::class, 'index'])->name('photos');
2024-03-04 17:32:45 +01:00
Route::get('/blog', [BlogController::class, 'index'])->name('blog');
2024-03-11 15:29:45 -07:00
Route::resource('/posts', PostController::class);
Route::middleware('auth')->group(function() {
Route::get('/admin', [AdminController::class, 'index'])->name('admin');
});