aboutsummaryrefslogtreecommitdiff
path: root/app/Http/Controllers/ReservationsController.php
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-11-02 15:25:36 +0100
committerMateja <mail@matejamaric.com>2020-11-02 15:25:36 +0100
commitb5afd40a49a2c2b061865a501103ea2a060f4997 (patch)
tree64b8ced33431c908442881ff3e63b898023f3c3e /app/Http/Controllers/ReservationsController.php
parentcd8cfe9d6a0b786e03142ae492b2d0d52f92e4f8 (diff)
downloadyota-laravel-b5afd40a49a2c2b061865a501103ea2a060f4997.tar.gz
yota-laravel-b5afd40a49a2c2b061865a501103ea2a060f4997.zip
Standardized controllers to CRUD...
Diffstat (limited to 'app/Http/Controllers/ReservationsController.php')
-rw-r--r--app/Http/Controllers/ReservationsController.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/app/Http/Controllers/ReservationsController.php b/app/Http/Controllers/ReservationsController.php
index 4816993..d3b141e 100644
--- a/app/Http/Controllers/ReservationsController.php
+++ b/app/Http/Controllers/ReservationsController.php
@@ -14,13 +14,26 @@ use App\Models\SpecialCall;
class ReservationsController extends Controller
{
- public function reserve(Request $request)
+ public function index(Request $request)
+ {
+ $activities = Reservation::where('approved', '1')->get();
+ //$activities = Reservation::addSelect([
+ //'specialCall' => SpecialCall::select('sign')
+ ////->whereColumn('reservations.specialCall', 'special_calls.id')
+ //->whereColumn('specialCall', 'id')
+ //->limit(1)
+ //])->get();
+
+ return view('pages.activities', compact('activities'));
+ }
+
+ public function create(Request $request)
{
$signs = SpecialCall::all();
return view('pages.reserve', compact('signs'));
}
- public function reserveForm(Request $request)
+ public function store(Request $request)
{
//$validatedData = $request->validate([
//...
@@ -72,13 +85,13 @@ class ReservationsController extends Controller
}
// Administration
- public function reservations(Request $request)
+ public function edit(Request $request)
{
$data = Reservation::all();
return view('pages.reservations', compact('data'));
}
- public function reservationsForm(Request $request)
+ public function update(Request $request)
{
return Redirect::back();
}