public function find($id) { $photo = Photo::findOrFail($id); if ($photo) { return $this->fromEloquent($photo); } }
/** * Display the specified photo. * * @param int $albumId Id of the album * @param int $photoId Id of the photo * @return \Illuminate\View\View */ public function show($albumId, $photoId) { $photo = $this->photo->findOrFail($photoId); $this->layout->content = \View::make('gallery::photo', array('photo' => $photo)); }
public function findOrFail($id) { return Photo::findOrFail($id); }