2016-06-05 10:46:40 +00:00
|
|
|
<?php
|
|
|
|
|
2018-08-18 13:19:40 +00:00
|
|
|
namespace App\Http\Controllers\API\MediaInformation;
|
2016-06-05 10:46:40 +00:00
|
|
|
|
2022-07-29 06:47:10 +00:00
|
|
|
use App\Http\Controllers\Controller;
|
2016-06-05 10:46:40 +00:00
|
|
|
use App\Models\Album;
|
2022-07-29 06:47:10 +00:00
|
|
|
use App\Services\MediaInformationService;
|
2016-06-05 10:46:40 +00:00
|
|
|
|
2018-08-18 13:19:40 +00:00
|
|
|
class AlbumController extends Controller
|
2016-06-05 10:46:40 +00:00
|
|
|
{
|
2022-07-29 06:47:10 +00:00
|
|
|
public function __construct(private MediaInformationService $mediaInformationService)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-08-06 09:43:59 +00:00
|
|
|
public function show(Album $album)
|
2016-06-05 10:46:40 +00:00
|
|
|
{
|
2022-07-08 14:53:04 +00:00
|
|
|
return response()->json($this->mediaInformationService->getAlbumInformation($album)?->toArray() ?: []);
|
2016-06-05 10:46:40 +00:00
|
|
|
}
|
|
|
|
}
|