Language editor refactoring part 1 (nackend)

This commit is contained in:
Peter Papp
2021-03-27 18:53:41 +01:00
parent cdb395c77f
commit ec51440c3a
25 changed files with 1833 additions and 1677 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class LanguageResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'data' => [
'id' => $this->id,
'type' => 'languages',
'attributes' => [
'name' => $this->name,
'locale' => $this->locale,
'updated_at' => $this->updated_at,
'created_at' => $this->created_at,
]
],
];
}
}