Open sidebar
public function getPost($id, $slug = false) { $post = Post::find($id); if ($post) { if ($post->slug != $slug || !$slug) { return Redirect::route('post', array('id' => $post->id, 'slug' => $post->slug), 303); } if ($post->active == false) { return redirect('/')->withErrors('requested page not found'); } } else { return redirect('/')->withErrors('requested page not found'); } return view('posts.show')->withPost($post); }
Close sidebar
Back
Please note that all pasted data is publicly available.
Twitter
GitHub
Use setting
Back
Please note that all pasted data is publicly available.
Twitter
GitHub
Use setting