Initial commit

This commit is contained in:
Marco Cavalli 2024-10-04 15:29:16 +02:00
commit d7b18a3095
127 changed files with 16738 additions and 0 deletions

21
routes/api.php Normal file
View file

@ -0,0 +1,21 @@
<?php
use App\Http\Controllers\MusicBrainzController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "api" middleware group. Make something great!
|
*/
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
return $request->user();
});

31
routes/auth.php Normal file
View file

@ -0,0 +1,31 @@
<?php
use App\Http\Controllers\Auth\VerifyEmailController;
use Illuminate\Support\Facades\Route;
use Livewire\Volt\Volt;
Route::middleware('guest')->group(function () {
Volt::route('register', 'pages.auth.register')
->name('register');
Volt::route('login', 'pages.auth.login')
->name('login');
Volt::route('forgot-password', 'pages.auth.forgot-password')
->name('password.request');
Volt::route('reset-password/{token}', 'pages.auth.reset-password')
->name('password.reset');
});
Route::middleware('auth')->group(function () {
Volt::route('verify-email', 'pages.auth.verify-email')
->name('verification.notice');
Route::get('verify-email/{id}/{hash}', VerifyEmailController::class)
->middleware(['signed', 'throttle:6,1'])
->name('verification.verify');
Volt::route('confirm-password', 'pages.auth.confirm-password')
->name('password.confirm');
});

18
routes/channels.php Normal file
View file

@ -0,0 +1,18 @@
<?php
use Illuminate\Support\Facades\Broadcast;
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callbacks are
| used to check if an authenticated user can listen to the channel.
|
*/
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
return (int) $user->id === (int) $id;
});

19
routes/console.php Normal file
View file

@ -0,0 +1,19 @@
<?php
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based console
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
|
*/
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');

31
routes/web.php Normal file
View file

@ -0,0 +1,31 @@
<?php
use App\Http\Controllers\MusicBrainzController;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| 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!
|
*/
Route::view('/', 'welcome');
Route::view('dashboard', 'dashboard')
->middleware(['auth', 'verified'])
->name('dashboard');
Route::view('profile', 'profile')
->middleware(['auth'])
->name('profile');
Route::post('/musicbrainz/get_track_metadata', [MusicBrainzController::class, 'get_track_metadata'])->name('musicbrainz.get_track');
Route::get('musicbrainz', [MusicBrainzController::class, 'test']);
require __DIR__.'/auth.php';