Files
Galeria/routes/web.php
2025-03-26 00:53:54 -03:00

36 lines
1.2 KiB
PHP

<?php
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\RootController;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
use App\Http\Controllers\SongController;
Route::get('/', [RootController::class, 'index']);
Route::get('/dashboard', function () {
return Inertia::render('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('/gallery', function () {
return Inertia::render('Gallery');
})->middleware(['auth', 'verified'])->name('gallery');
// Api canciones
//
Route::get('/songs', [SongController::class, 'index']);
Route::get('/songs/stream/{id}', [SongController::class, 'stream']);
Route::post('/songs', [SongController::class, 'store']);
Route::put('/songs/{id}', [SongController::class, 'update']);
Route::delete('/songs/{id}', [SongController::class, 'destroy']);
require __DIR__.'/auth.php';