35 lines
1.5 KiB
PHP
35 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Models\Show\Show;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
/** @mixin Show */
|
|
class ShowResource extends JsonResource
|
|
{
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'name' => $this->name,
|
|
'url' => $this->url,
|
|
'genre' => $this->genre,
|
|
'description' => $this->description,
|
|
'color' => $this->color,
|
|
'background_color' => $this->background_color,
|
|
'live_stream_using_airtime_auth' => $this->live_stream_using_airtime_auth,
|
|
'live_stream_using_custom_auth' => $this->live_stream_using_custom_auth,
|
|
'live_stream_user' => $this->live_stream_user,
|
|
'live_stream_pass' => $this->live_stream_pass,
|
|
'linked' => $this->linked,
|
|
'is_linkable' => $this->is_linkable,
|
|
'image_path' => $this->image_path,
|
|
'has_autoplaylist' => $this->has_autoplaylist,
|
|
'autoplaylist_id' => $this->autoplaylist_id,
|
|
'autoplaylist_repeat' => $this->autoplaylist_repeat,
|
|
'created_at' => $this->created_at,
|
|
'updated_at' => $this->updated_at,
|
|
];
|
|
}
|
|
}
|