Files
Galeria/routes/web.php

36 lines
1.3 KiB
PHP

<?php
use App\Http\Controllers\GalleryController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\RootController;
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', [GalleryController::class, "index"])
->middleware(['auth', 'verified'])
->name('gallery');
// Api canciones
//
Route::get('/canciones', [SongController::class, 'index'])->name('canciones');
Route::get('/canciones/stream/{id}', [SongController::class, 'stream']);
Route::post('/canciones', [SongController::class, 'store']);
Route::put('/canciones/{id}', [SongController::class, 'update']);
Route::delete('/canciones/{id}', [SongController::class, 'destroy'])->middleware(['auth', 'verified']);
require __DIR__.'/auth.php';