/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit(Event $event) { $calendars = \App\Calendar::lists('name', 'id'); $checked = $event->calendars()->lists('id')->toArray(); return view('events.edit', compact('calendars', 'checked', 'event')); }