testlara/routes/web.php

27 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2023-10-27 19:59:05 +03:00
<?php
use App\Http\Controllers\ProductController;
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('/', function () {
return view('welcome');
});
Route::resource('products', ProductController::class);
Route::prefix('documents')->group(function () {
Route::get('/', [\App\Http\Controllers\DocumentController::class, 'index'])->name('documents.show');
Route::get('/create', [\App\Http\Controllers\DocumentController::class, 'create'])->name('documents.create');
Route::post('/store', [\App\Http\Controllers\DocumentController::class, 'store'])->name('documents.store');
Route::post('/apply/{id}', [\App\Http\Controllers\DocumentController::class, 'apply'])->name('documents.apply');
});