my-projects-website/app/application/routes/web-project.php
Leonid Nikitin 156d8a9f68
Added middleware IsWebsiteTranslations and IsProject.
This fixes errors where Project or WebsiteTranslations are not found.
2024-05-03 00:06:59 +05:00

16 lines
961 B
PHP

<?php
use Illuminate\Support\Facades\Route;
Route::get('/', [\App\Http\Controllers\Site\ProjectsController::class, 'index'])->name('home');
Route::middleware([\App\Http\Middleware\IsProject::class, \App\Http\Middleware\IsWebsiteTranslations::class])->group(function () {
Route::get('/language/{language}', [\App\Http\Controllers\Site\ProjectsController::class, 'index'])->name('home-language');
Route::prefix('feedback')->group(function () {
Route::get('/', [\App\Http\Controllers\Site\FeedbackController::class, 'index'])->name('feedback');
Route::get('language/{language}', [\App\Http\Controllers\Site\FeedbackController::class, 'index'])->name('feedback-language');
Route::post('/', [\App\Http\Controllers\Site\FeedbackController::class, 'send'])->name('feedback.send');
Route::post('language/{language}', [\App\Http\Controllers\Site\FeedbackController::class, 'send'])->name('feedback.send-language');
});
});