<?php

use Illuminate\Support\Facades\Route;

use App\Http\Controllers\QrCodeController;

Route::get('/', function () {
    return view('welcome');
});

Auth::routes(['register' => false,]);

Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');

Route::middleware('auth')->group(function () {
    Route::resource('qrs', QrCodeController::class);
    Route::get('qrs/{qr}/change-state', [QrCodeController::class, 'changeState'])->name('qrs.change-state');
});
