Files
2025-08-17 16:23:14 +05:45

25 lines
1.1 KiB
PHP

<?php
use Illuminate\Support\Facades\Route;
use Modules\Post\app\Http\Controllers\PostController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::group(['prefix' => 'apanel', 'middleware' => ['auth']], function () {
Route::get('posts', [PostController::class, 'index'])->name('post.index');
Route::get('posts/create', [PostController::class, 'create'])->name('post.create');
Route::post('posts/store', [PostController::class, 'store'])->name('post.store');
Route::get('posts/{id}/edit', [PostController::class, 'edit'])->name('post.edit');
Route::put('posts/{id}/update', [PostController::class, 'update'])->name('post.update');
Route::delete('posts/{id}/delete', [PostController::class, 'destroy'])->name('post.delete');
});