You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
904 B

  1. <?php
  2. use App\Http\Controllers\ProfileController;
  3. use Illuminate\Foundation\Application;
  4. use Illuminate\Support\Facades\Route;
  5. use Inertia\Inertia;
  6. Route::get('/', function () {
  7. return Inertia::render('Welcome', [
  8. 'canLogin' => Route::has('login'),
  9. 'canRegister' => Route::has('register'),
  10. 'laravelVersion' => Application::VERSION,
  11. 'phpVersion' => PHP_VERSION,
  12. ]);
  13. });
  14. Route::get('/dashboard', function () {
  15. return Inertia::render('Dashboard');
  16. })->middleware(['auth', 'verified'])->name('dashboard');
  17. Route::middleware('auth')->group(function () {
  18. Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
  19. Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
  20. Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
  21. });
  22. require __DIR__.'/auth.php';