app/Http/Controllers/Admin/PostController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Model\Post  $post
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit(Post $post)
    {
        if (Auth::user()->id != $post->user_id) {
            abort('403');
        }
        $categories = Category::all();
        $tags = Tag::all();
        return view('admin.posts.edit', ['post' => $post, 'categories' => $categories, 'tags'=> $tags]);
    }
public function edit ( Post $ post ) { if ( Auth :: user ( ) -> id != $ post -> user_id ) { abort ( '403' ) ; } $ categories = Category :: all ( ) ; $ tags = Tag :: all ( ) ; return view ( 'admin.posts.edit' , [ 'post' => $ post , 'categories' => $ categories , 'tags' => $ tags ] ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .