web.php 881 B

12345678910111213141516171819202122232425
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. use App\Http\Controllers\planeController;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Web Routes
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here is where you can register web routes for your application. These
  10. | routes are loaded by the RouteServiceProvider within a group which
  11. | contains the "web" middleware group. Now create something great!
  12. |
  13. */
  14. Route::get('/plane', [planeController::class, "getAll"])->name("Самолеты");
  15. Route::post('/plane/create', [planeController::class, "createNew"]);
  16. Route::get('/plane/create', function() {
  17. return view('planeForm');
  18. })->name("Создание")->middleware('auth');
  19. Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () {
  20. return view('dashboard');
  21. })->name('dashboard');