2024-02-29 18:09:17 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
2024-07-13 22:23:01 +02:00
|
|
|
use App\Http\Controllers\RouteGetController;
|
|
|
|
use App\Http\Controllers\RoutePostController;
|
|
|
|
use App\Http\Controllers\RoutePutController;
|
|
|
|
use App\Http\Controllers\RouteDeleteController;
|
|
|
|
use App\Http\Middleware\VerifyCsrfToken;
|
2024-02-29 18:09:17 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-05-06 21:37:26 +02:00
|
|
|
//routing needs a bit more nuance, so requests are sent to a controller to sort traffic
|
2024-07-13 22:23:01 +02:00
|
|
|
Route::get("/{first?}/{second?}/{third?}/{four?}", [RouteGetController::class, 'handleRequest']);
|
|
|
|
Route::post("/{first?}/{second?}/{third?}", [RoutePostController::class, 'handleRequest'])
|
|
|
|
->middleware(VerifyCsrfToken::class);
|
|
|
|
Route::put("/{first?}/{second?}/{third?}", [RoutePutController::class, 'handleRequest'])
|
|
|
|
->middleware(VerifyCsrfToken::class);
|
|
|
|
Route::delete("/{first?}/{second?}/{third?}", [RouteDeleteController::class, 'handleRequest'])
|
|
|
|
->middleware(VerifyCsrfToken::class);
|