/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $event = Event::where(compact('id'))->first(); return view('admin.pages.events.show', compact('event')); }
/** * Returns an event based on current date * * @return \FishingFestival\Models\Events\Event */ public static function assign() { $today = (new Carbon())->toDateString(); return Event::where('start_date', '<=', $today)->where('end_date', '>=', $today)->first(); }