mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 10:49:10 -04:00
3.2.1
This commit is contained in:
@@ -42,7 +42,16 @@ class BookingController extends Controller
|
||||
*/
|
||||
public function create($type,$id)
|
||||
{
|
||||
return view('admin.booking.create',['items' => \App\Item::training(),'event_type' => $type,'event_id' => $id]);
|
||||
$event = null;
|
||||
if($type == 'course')
|
||||
{
|
||||
$event = \App\Course::find($id)->event;
|
||||
}
|
||||
else if ($type == 'event')
|
||||
{
|
||||
$event = \App\Event::find($id);
|
||||
}
|
||||
return view('admin.booking.create',['items' => \App\Item::training(),'event_type' => $type,'event_id' => $id,'event' => $event]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,13 +145,31 @@ class BookingController extends Controller
|
||||
$b->delete();
|
||||
}
|
||||
|
||||
public function modalItem($id)
|
||||
public function modalItem($id,$event_type,$event_id)
|
||||
{
|
||||
return view('admin.booking.modal.create',['item' => \App\Item::find($id)]);
|
||||
$event = null;
|
||||
if ($event_type == 'course')
|
||||
{
|
||||
$event = \App\Course::find($event_id)->event;
|
||||
}
|
||||
else
|
||||
{
|
||||
$event = \App\Event::find($event_id);
|
||||
}
|
||||
return view('admin.booking.modal.create',['item' => \App\Item::find($id),'event' => $event]);
|
||||
}
|
||||
|
||||
public function modalItemEdit($id)
|
||||
public function modalItemEdit($id,$event_type,$event_id)
|
||||
{
|
||||
return view('admin.booking.modal.edit',['booking' => \App\Booking::find($id)]);
|
||||
$event = null;
|
||||
if ($event_type == 'course')
|
||||
{
|
||||
$event = \App\Course::find($event_id)->event;
|
||||
}
|
||||
else
|
||||
{
|
||||
$event = \App\Event::find($event_id);
|
||||
}
|
||||
return view('admin.booking.modal.edit',['booking' => \App\Booking::find($id),'event' => $event]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user