mirror of
https://github.com/koel/koel
synced 2024-11-14 00:17:13 +00:00
22 lines
438 B
PHP
22 lines
438 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;
|
|
|
|
public function getModelClass(): string
|
|
{
|
|
return Playlist::class;
|
|
}
|
|
|
|
public function getAllByCurrentUser(): Collection
|
|
{
|
|
return $this->byCurrentUser()->orderBy('name')->get();
|
|
}
|
|
}
|