/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit(TagRepository $tag, SourceRepository $source, $id) { $routeName = 'map'; $routeMethod = 'edit'; $map = $this->map->getById($id); if (!$map) { return redirect()->route('admin.map.index'); } $tags = $tag->getAllOrderedBy('name'); $sources = $source->getAllOrderedBy('name'); $environment = collect(['settings' => \Cache::get('settings')]); $environment = $environment->toJSON(); $data = compact('routeName', 'routeMethod', 'map', 'tags', 'sources', 'environment'); \Clockwork::info($data); return view('admin.sections.map.edit', $data); }