public function edit(Post $post) { $images = Image::latest()->take(10)->get(); $locations = Location::latest()->take(10)->get(); return View('admin.posts.edit', compact('post', 'images', 'locations')); }
public function blog() { $posts = Post::latest('published_at')->published()->get(); $locations = Location::latest()->take(10)->get(); return View('posts.blog', compact('posts', 'locations')); }