mirror of
https://github.com/koel/koel
synced 2024-11-24 13:13:05 +00:00
23 lines
438 B
PHP
23 lines
438 B
PHP
<?php
|
|
|
|
namespace App\Repositories;
|
|
|
|
use App\Models\Artist;
|
|
use App\Models\Song;
|
|
|
|
class ArtistRepository extends AbstractRepository
|
|
{
|
|
public function getModelClass(): string
|
|
{
|
|
return Artist::class;
|
|
}
|
|
|
|
public function getNonEmptyArtistIds(): array
|
|
{
|
|
return Song::select('artist_id')
|
|
->groupBy('artist_id')
|
|
->get()
|
|
->pluck('artist_id')
|
|
->toArray();
|
|
}
|
|
}
|