/** * 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 resource. * * @param string $permalink * @return \Illuminate\Http\Response */ public function edit($permalink) { $variables = ['artists' => Artist::orderBy('id')->lists('name', 'id'), 'release' => Release::where('permalink', $permalink)->first(), 'tags' => Tag::lists('name', 'id')]; return view('admin/releases/edit', $variables); }
/** * Show the form for editing the specified resource. * * @param string $permalink * @return Response */ public function edit($permalink) { $tags = Tag::lists('name', 'id'); $video = Video::where('permalink', $permalink)->first(); return view('admin.videos.edit', compact('tags', 'video')); }
/** * 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); }