From f6c519261dccaccddb4f418552084cc5d9e3c2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Drunen?= Date: Sun, 6 Aug 2023 19:33:28 +0200 Subject: [PATCH] Create endpoint, controller and front-end assets for SPA prototype --- app/Http/Controllers/PrototypeController.php | 13 +++++++++++++ resources/assets/js/prototype.js | 0 resources/assets/js/prototype/app.js | 8 ++++++++ resources/assets/js/prototype/components/App.vue | 9 +++++++++ resources/views/prototype.blade.php | 7 +++++++ routes/web.php | 2 ++ 6 files changed, 39 insertions(+) create mode 100644 app/Http/Controllers/PrototypeController.php create mode 100644 resources/assets/js/prototype.js create mode 100644 resources/assets/js/prototype/app.js create mode 100644 resources/assets/js/prototype/components/App.vue create mode 100644 resources/views/prototype.blade.php diff --git a/app/Http/Controllers/PrototypeController.php b/app/Http/Controllers/PrototypeController.php new file mode 100644 index 00000000..720d23ec --- /dev/null +++ b/app/Http/Controllers/PrototypeController.php @@ -0,0 +1,13 @@ + h(App) +}) diff --git a/resources/assets/js/prototype/components/App.vue b/resources/assets/js/prototype/components/App.vue new file mode 100644 index 00000000..0e4c33c9 --- /dev/null +++ b/resources/assets/js/prototype/components/App.vue @@ -0,0 +1,9 @@ + + + diff --git a/resources/views/prototype.blade.php b/resources/views/prototype.blade.php new file mode 100644 index 00000000..eda37edf --- /dev/null +++ b/resources/views/prototype.blade.php @@ -0,0 +1,7 @@ + + + +
+ @vite('resources/assets/js/prototype/app.js') + + diff --git a/routes/web.php b/routes/web.php index 133a63f2..64b8a0e7 100644 --- a/routes/web.php +++ b/routes/web.php @@ -27,6 +27,8 @@ Route::get('/', [IndexController::class, 'index'])->name('index'); +Route::get('/prototype', \App\Http\Controllers\PrototypeController::class); + Route::group(['middleware' => ['guest']], function () { Route::get('/login', [LoginController::class, 'index'])->name('login'); Route::post('/login', [LoginController::class, 'store']);