/** * Displays the form for editing the specified event. * * @param string $id * * @return mixed */ public function edit($id) { $event = $this->event->find($id); $apiObject = $this->event->findApiObject($event->api_id); if ($apiObject) { return view('events.edit', compact('event', 'apiObject')); } abort(404); }
/** * @param int|string $resourceId * @param int|string $eventId * * @return mixed */ public function edit($resourceId, $eventId) { $routes = $this->routes; $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId); if (method_exists($eventable, 'events')) { $event = $eventable->events()->find($eventId); if ($event) { $apiObject = $this->event->findApiObject($event->api_id); return view('events.eventables.edit', compact('routes', 'eventable', 'event', 'apiObject')); } } abort(404); }