/**
  * Handle the command.
  *
  * @param  UpdateAlbumCommand  $command
  * @return void
  */
 public function handle(UpdateAlbumCommand $command)
 {
     $album_object = Albums::edit($command->album_id, $command->name, str_slug($command->name), $command->featured_image_id);
     $album = $this->repo->save($album_object);
     Event::fire(new AlbumWasUpdated($album));
     return $album;
 }
Exemplo n.º 2
0
 public function getBySlug($slug)
 {
     return Albums::where('slug', $slug)->first();
 }