Initial api service;
Clean code;
This commit is contained in:
@@ -26,36 +26,17 @@ Route::get('/', function () {
|
||||
return redirect('words');
|
||||
});
|
||||
|
||||
Route::prefix('test')->group(function () {
|
||||
|
||||
Route::get('/{name?}', function (?string $name = null) {
|
||||
return $name ?? 'niente';
|
||||
})->whereAlpha('name');
|
||||
|
||||
Route::get('/{number}', function (int $number = null) {
|
||||
return $number;
|
||||
})->whereNumber('number');
|
||||
});
|
||||
|
||||
Route::get('/pippo', function (Request $request) {
|
||||
return response()->json([
|
||||
'name' => 'Abigail',
|
||||
'state' => 'CA',
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Route::get('/dashboard', function () {
|
||||
return view('dashboard');
|
||||
})->middleware(['auth', 'verified'])->name('dashboard');
|
||||
|
||||
Route::middleware('auth')->group(function () {
|
||||
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
|
||||
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
|
||||
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
|
||||
});
|
||||
//Route::get('/dashboard', function () {
|
||||
// return view('dashboard');
|
||||
//})->middleware(['auth', 'verified'])->name('dashboard');
|
||||
//
|
||||
//Route::middleware('auth')->group(function () {
|
||||
// Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
|
||||
// Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
|
||||
// Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
|
||||
//});
|
||||
|
||||
Route::prefix('words')->group(function () {
|
||||
Route::get('/', [WordsController::class, 'index'])->name('words.index');
|
||||
|
||||
Reference in New Issue
Block a user