master_template/routes/route.news.php

15 lines
1.0 KiB
PHP
Raw Normal View History

2024-06-15 16:38:54 +00:00
<?php
use App\Http\Controllers\NewsController;
use Illuminate\Support\Facades\Route;
Route::prefix("news")->group(function () {
Route::get('/', [NewsController::class, 'index'])->name('news.index');
Route::get('/create', [NewsController::class, 'create'])->name('news.create');
Route::post('/store', [NewsController::class, 'store'])->name('news.store');
Route::post('/sort', [NewsController::class, 'sort'])->name('news.sort');
Route::post('/updatealias', [NewsController::class, 'updatealias'])->name('news.updatealias');
Route::get('/show/{id}', [NewsController::class, 'show'])->name('news.show');
Route::get('/edit/{id}', [NewsController::class, 'edit'])->name('news.edit') ;
Route::post('/update/{id}', [NewsController::class, 'update'])->name('news.update');
Route::delete('/destroy/{id}', [NewsController::class, 'destroy'])->name('news.destroy');
Route::get('/toggle/{id}', [NewsController::class, 'toggle'])->name('news.toggle');
});