koel/app/Repositories/ArtistRepository.php

22 lines
419 B
PHP
Raw Normal View History

2018-08-29 06:30:39 +00:00
<?php
namespace App\Repositories;
use App\Models\Song;
2020-12-24 12:41:18 +00:00
use App\Repositories\Traits\Searchable;
2018-08-29 06:30:39 +00:00
class ArtistRepository extends AbstractRepository
{
2020-12-24 12:41:18 +00:00
use Searchable;
2020-12-22 20:11:22 +00:00
/** @return array<int> */
public function getNonEmptyArtistIds(): array
{
return Song::select('artist_id')
->groupBy('artist_id')
->get()
->pluck('artist_id')
->toArray();
}
2018-08-29 06:30:39 +00:00
}