aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-03-14 14:19:33 +0100
committerMateja <mail@matejamaric.com>2021-03-14 14:19:33 +0100
commitc5209f1a698113f48d7435c5363b11e925d16e23 (patch)
tree557eed9a19f25f33fee329b8eeb7a899161325bc
parent00abd5229c63b570af751406fc322e197c4f51c0 (diff)
downloadyota-laravel-c5209f1a698113f48d7435c5363b11e925d16e23.tar.gz
yota-laravel-c5209f1a698113f48d7435c5363b11e925d16e23.zip
Add `/special-calls/show` route.
-rw-r--r--app/Http/Controllers/SpecialCallsController.php7
-rw-r--r--routes/web.php1
2 files changed, 8 insertions, 0 deletions
diff --git a/app/Http/Controllers/SpecialCallsController.php b/app/Http/Controllers/SpecialCallsController.php
index 025d955..a26af78 100644
--- a/app/Http/Controllers/SpecialCallsController.php
+++ b/app/Http/Controllers/SpecialCallsController.php
@@ -13,6 +13,13 @@ use App\Models\SpecialCall;
class SpecialCallsController extends Controller
{
+ public function index(Request $request)
+ {
+ //$data = SpecialCall::select('sign')->get()->toArray();
+ $data = SpecialCall::all()->toArray();
+ return $data;
+ }
+
public function create(Request $request)
{
$data = SpecialCall::all();
diff --git a/routes/web.php b/routes/web.php
index 20437b1..4616364 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -48,6 +48,7 @@ Route::post('/api/reservations', [ReservationsController::class, 'update'])->mid
Route::get('/special-calls/add', [SpecialCallsController::class, 'create'])->name('addSign')->middleware(['auth']);
Route::post('/special-calls/add', [SpecialCallsController::class, 'store'])->name('addSignForm')->middleware(['auth']);
+Route::get('/special-calls/show', [SpecialCallsController::class, 'index']);
Route::get('/special-calls/show/{name}', [SpecialCallsController::class, 'show']);
Route::get('/special-calls/edit/{id}', [SpecialCallsController::class, 'edit'])->name('editSign')->middleware(['auth']);
Route::post('/special-calls/edit/{id}', [SpecialCallsController::class, 'update'])->name('editSignForm')->middleware(['auth']);