megahunt.test/routes/web.php

34 lines
1.1 KiB
PHP

<?php
use App\Http\Controllers\PrivateUserController;
use App\Http\Controllers\PublicUserController;
use App\Http\Controllers\TrashUserController;
use Illuminate\Support\Facades\Route;
Route::get('/', function() {
return view('welcome');
});
Route::prefix('/api')->group(function() {
Route::controller(PublicUserController::class)->prefix('/users')->group(function() {
Route::put('/register', 'register');
Route::post('/login', 'login');
Route::post('/reset', 'reset');
});
Route::controller(PrivateUserController::class)->prefix('/users/private')->group(function () {
Route::get('/list', 'list');
Route::get('/get/{id}', 'get')->whereUuid('id');
Route::put('/edit/{id}', 'edit')->whereUuid('id');
});
Route::controller(TrashUserController::class)->prefix('/users/private/trash')->group(function () {
Route::put('/group', 'addMultiple');
Route::delete('/group', 'deleteMultiple');
Route::delete('/clean', 'cleanMultiple');
Route::get('/list', 'list');
});
});
Route::get('/session', function() {
exit(print_r(session()->all(), true));
});