koel/app/Repositories/PlaylistRepository.php

19 lines
395 B
PHP
Raw Normal View History

2018-08-29 06:15:11 +00:00
<?php
namespace App\Repositories;
use App\Models\Playlist;
use App\Repositories\Traits\ByCurrentUser;
use Illuminate\Support\Collection;
class PlaylistRepository extends AbstractRepository
{
use ByCurrentUser;
2020-12-22 20:11:22 +00:00
/** @return Collection|array<Playlist> */
2018-08-29 06:15:11 +00:00
public function getAllByCurrentUser(): Collection
{
return $this->byCurrentUser()->orderBy('name')->get();
}
}