Removing default translatable fields from base lvl

parent 5a302d8d
...@@ -10,12 +10,12 @@ class PageTransformer extends Resource ...@@ -10,12 +10,12 @@ class PageTransformer extends Resource
{ {
return [ return [
'id' => $this->id, 'id' => $this->id,
'title' => $this->title, 'is_home' => $this->is_home,
'slug' => $this->slug, 'template' => $this->template,
'created_at' => $this->created_at->format('d-m-Y'), 'created_at' => $this->created_at->format('d-m-Y'),
'translations' => [ 'translations' => [
'title' => $this->title, 'title' => $this->translate(locale())->title,
'slug' => $this->slug, 'slug' => $this->translate(locale())->slug,
], ],
'urls' => [ 'urls' => [
'delete_url' => route('api.page.page.destroy', $this->id), 'delete_url' => route('api.page.page.destroy', $this->id),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment