koel/app/Repositories/PlaylistRepository.php

19 lines
387 B
PHP
Raw Normal View History

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