/** * Show the form for editing the specified resource. * * @param string $permalink * @return \Illuminate\Http\Response */ public function edit($permalink) { $variables = ['categories' => Category::lists('name', 'id'), 'tags' => Tag::lists('name', 'id'), 'notice' => Notice::where('permalink', $permalink)->first()]; return view('admin/news/edit', $variables); }
/** * Muestra un formulario para actualizar una post existente. * * @param string $post * @return Response */ public function edit(Post $post) { if (Gate::denies('edit-post', $post)) { session()->flash('message', 'No tienes permiso para editar posts'); return redirect()->route('admin.posts.index'); } $variables = ['post' => $post, 'tags' => Tag::lists('name', 'id'), 'categories' => Category::lists('name', 'id')]; return view('admin/posts/edit', $variables); }
/** * Show the form for editing the specified landing page. * * @param string $permalink * @return \Illuminate\Http\Response */ public function edit($permalink) { $categories = Category::lists('name', 'id'); $page = Landing::where('permalink', $permalink)->first(); return view('admin/landing/edit', compact('page', 'categories')); }