koel/app/Repositories/PlaylistRepository.php

19 lines
387 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;
2022-07-29 06:47:10 +00:00
class PlaylistRepository extends Repository
2018-08-29 06:15:11 +00:00
{
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();
}
}