koel/app/Http/Controllers/API/ArtistController.php

26 lines
526 B
PHP
Raw Normal View History

2022-06-10 10:47:46 +00:00
<?php
2023-06-05 21:46:41 +00:00
namespace App\Http\Controllers\API;
2022-06-10 10:47:46 +00:00
2022-07-29 06:47:10 +00:00
use App\Http\Controllers\Controller;
2022-06-10 10:47:46 +00:00
use App\Http\Resources\ArtistResource;
use App\Models\Artist;
use App\Repositories\ArtistRepository;
class ArtistController extends Controller
{
public function __construct(private ArtistRepository $repository)
2022-07-27 15:32:36 +00:00
{
2022-06-10 10:47:46 +00:00
}
public function index()
{
return ArtistResource::collection($this->repository->paginate());
2022-06-10 10:47:46 +00:00
}
public function show(Artist $artist)
{
return ArtistResource::make($artist);
2022-06-10 10:47:46 +00:00
}
}