public function getPost($id) { $post = Post::with('photos')->where('id', '=', $id)->first(); return $post; }