| @@ 44-53 (lines=10) @@ | ||
| 41 | * |
|
| 42 | * @return \Illuminate\Http\Response |
|
| 43 | */ |
|
| 44 | public function create() |
|
| 45 | { |
|
| 46 | $post = new Post; |
|
| 47 | ||
| 48 | return view('blog.admin.posts.post', [ |
|
| 49 | 'post' => $post, |
|
| 50 | 'categories' => Category::all(), |
|
| 51 | 'tags' => Tag::all(), |
|
| 52 | ]); |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Store a newly created resource in storage. |
|
| @@ 83-92 (lines=10) @@ | ||
| 80 | * @param \Chriscreates\Blog\Post $post |
|
| 81 | * @return \Illuminate\Http\Response |
|
| 82 | */ |
|
| 83 | public function edit(Post $post) |
|
| 84 | { |
|
| 85 | $post->load('category', 'tags'); |
|
| 86 | ||
| 87 | return view('blog.admin.posts.post', [ |
|
| 88 | 'post' => $post, |
|
| 89 | 'categories' => Category::all(), |
|
| 90 | 'tags' => Tag::all(), |
|
| 91 | ]); |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * Update the specified resource in storage. |
|