diff --git a/device-app/app/Http/Controllers/DeviceController.php b/device-app/app/Http/Controllers/DeviceController.php index 9c01feb..e3a5f8a 100644 --- a/device-app/app/Http/Controllers/DeviceController.php +++ b/device-app/app/Http/Controllers/DeviceController.php @@ -15,6 +15,12 @@ public function index() ]); } + public function create(){ + return view('devices.create', [ + + ]); + } + public function show(Device $device) { return view('devices.show', [ diff --git a/device-app/resources/views/devices/create.blade.php b/device-app/resources/views/devices/create.blade.php new file mode 100644 index 0000000..f7c898f --- /dev/null +++ b/device-app/resources/views/devices/create.blade.php @@ -0,0 +1,5 @@ +@extends('layout') + +@section('content') +create +@endsection \ No newline at end of file diff --git a/device-app/resources/views/devices/index.blade.php b/device-app/resources/views/devices/index.blade.php index 0f076b0..cd6742f 100644 --- a/device-app/resources/views/devices/index.blade.php +++ b/device-app/resources/views/devices/index.blade.php @@ -11,4 +11,5 @@ @else
No devices found
@endunless + @endsection diff --git a/device-app/routes/web.php b/device-app/routes/web.php index 716a9fa..fcb2b37 100644 --- a/device-app/routes/web.php +++ b/device-app/routes/web.php @@ -19,6 +19,14 @@ 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 +// edit - show edit form +// update - update device +// destroy - delete device +// show - show sigle device Route::get('/devices/{device}', [DeviceController::class, 'show']);