File: D:/HostingSpaces/SBogers10/csb.komma.pro/app/Pages/Resources/PageTranslation.php
<?php declare(strict_types=1);
namespace App\Pages\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class PageTranslation extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request
* @return array
*/
public function toArray($request)
{
return [
'slug' => $this->slug,
'name' => $this->name,
'subtitle' => $this->subtitle,
'intro' => $this->intro,
'description' => $this->description,
'meta_title' => $this->meta_title,
'meta_description' => $this->meta_description,
'translatable' => $this->whenLoaded('translatable', $this->translatable),
'language' => $this->whenLoaded('language', $this->language),
'route' => $this->whenLoaded('route', $this->route),
'redirectRoutes' => $this->redirectRoutes,
];
}
}