2023-03-26 17:36:20 +02:00

38 lines
1.1 KiB
PHP

<?php
use App\Http\Controllers\DeviceController;
use Illuminate\Support\Facades\Route;
use App\Models\Device;
/*
|--------------------------------------------------------------------------
| 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::get('/', function () {
return view('welcome');
});
// index - show all devices
Route::get('/devices', [DeviceController::class, 'index']);
// create - show create form
Route::get('/devices/create', [DeviceController::class, 'create']);
// store - store new device
Route::post('/devices', [DeviceController::class, 'store']);
// edit - show edit form
Route::get('devices/{device}/edit', [DeviceController::class, 'edit']);
// update - update device
// destroy - delete device
// show - show sigle device
Route::get('/devices/{device}', [DeviceController::class, 'show']);