koel/app/Repositories/PlaylistRepository.php

23 lines
438 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;
public function getModelClass(): string
{
return Playlist::class;
}
public function getAllByCurrentUser(): Collection
{
return $this->byCurrentUser()->orderBy('name')->get();
}
}