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