init commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Loaders;
|
||||
|
||||
use App\Models\ORM\Track;
|
||||
|
||||
class PlaylistLoader
|
||||
{
|
||||
public function getPlaylist(): array
|
||||
{
|
||||
$data = Track::select(
|
||||
"Track.Name as Track",
|
||||
"Performer.Name as Performer"
|
||||
)->join('Performer', function ($join) {
|
||||
$join->on('Performer.Id', "=", "Track.Performer")
|
||||
->where('Performer.DeleteDate', NULL);
|
||||
})->orderBy('Performer')->get();
|
||||
|
||||
return $data ? $data->toArray() : [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user