18 lines
496 B
PHP
18 lines
496 B
PHP
<?php
|
|
|
|
use App\Http\Controllers\PostController;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::get('/', function () {
|
|
return view('welcome');
|
|
});
|
|
|
|
Auth::routes();
|
|
|
|
Route::middleware(['auth'])->group(function () {
|
|
Route::get('/home', [PostController::class, 'index'])->name('home');
|
|
Route::resource('posts', PostController::class)->except(['index', 'show']);
|
|
Route::get('/posts/{post}', [PostController::class, 'show'])->name('posts.show');
|
|
});
|