diff --git a/device-app/resources/views/deviceDetail.blade.php b/device-app/resources/views/deviceDetail.blade.php new file mode 100644 index 0000000..12655c9 --- /dev/null +++ b/device-app/resources/views/deviceDetail.blade.php @@ -0,0 +1 @@ +

Device DEtail

\ No newline at end of file diff --git a/device-app/resources/views/deviceList.blade.php b/device-app/resources/views/deviceList.blade.php new file mode 100644 index 0000000..798bf9a --- /dev/null +++ b/device-app/resources/views/deviceList.blade.php @@ -0,0 +1,8 @@ +

Device List

+@unless(count($devices) == 0) +@foreach($devices as $device) +@endforeach + +@else +

No devices

+@endunless diff --git a/device-app/resources/views/welcome.blade.php b/device-app/resources/views/welcome.blade.php index 0406510..f47aba5 100644 --- a/device-app/resources/views/welcome.blade.php +++ b/device-app/resources/views/welcome.blade.php @@ -1,140 +1 @@ - - - - - - - Laravel - - - - - - - - - -
- @if (Route::has('login')) -
- @auth - Home - @else - Log in - - @if (Route::has('register')) - Register - @endif - @endauth -
- @endif - -
-
- - - -
- - - -
- - -
- Laravel v{{ Illuminate\Foundation\Application::VERSION }} (PHP v{{ PHP_VERSION }}) -
-
-
-
- - +

Welcome

\ No newline at end of file diff --git a/device-app/routes/api.php b/device-app/routes/api.php index 889937e..fa1c366 100644 --- a/device-app/routes/api.php +++ b/device-app/routes/api.php @@ -14,6 +14,19 @@ | */ +Route::get('deviceList', function() { + return response()->json([ + 'devices' => [ + [ + 'title' => 'Device One' + ], + [ + 'title' => 'Device Two' + ] + ] + ]); +}); + Route::middleware('auth:sanctum')->get('/user', function (Request $request) { return $request->user(); }); diff --git a/device-app/routes/web.php b/device-app/routes/web.php index d259f33..ec2f31d 100644 --- a/device-app/routes/web.php +++ b/device-app/routes/web.php @@ -1,5 +1,6 @@