/** * This function loads the add event category view. * * * @return add event categories view with services table data */ public function AddEventCategoriesLoad() { $services = Services::distinct()->select('*')->groupBy('Service')->get(); return view('event_types.add')->with('services', $services); }
/** * This function loads the edit services page * * @param Service Name in URL * * @return edit services page */ public function EditServices() { $input = Request::all(); if ($input == null) { return redirect('dashboard/services'); } $service = $_GET['Service']; $services = Services::distinct()->select('Service')->where('Service', $service)->get(); return view('services.edit-service'); }
} .is_available{ color:green; } .is_not_available{ color:red; } </style> <?php use App\Models\Event_Types; use App\Models\Event_Services; use App\Models\Services; //get data from tables using EventName from URL $services = Services::distinct()->select('Service')->groupBy('Service')->get(); $result4 = Event_Services::select('Service')->where('EventName', $EventName)->get(); $result3 = Event_Types::select('*')->where('EventName', $EventName)->get(); foreach ($result3 as $ic) { $result3 = $ic->Icon; } ?> @endsection @section('header-js') @endsection @section('content') <div class="content"> <div class="container">