コード例 #1
0
 public function find($id)
 {
     $album = Album::findOrFail($id);
     if ($album) {
         return $this->fromEloquent($album);
     }
 }
コード例 #2
0
 /**
  * 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));
 }
コード例 #3
0
 public function findOrFail($id)
 {
     return Album::findOrFail($id);
 }