koel/app/Repositories/PlaylistRepository.php
2020-12-24 13:41:18 +01:00

18 lines
395 B
PHP

<?php
namespace App\Repositories;
use App\Models\Playlist;
use App\Repositories\Traits\ByCurrentUser;
use Illuminate\Support\Collection;
class PlaylistRepository extends AbstractRepository
{
use ByCurrentUser;
/** @return Collection|array<Playlist> */
public function getAllByCurrentUser(): Collection
{
return $this->byCurrentUser()->orderBy('name')->get();
}
}