2024-05-15 00:31:24 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
|
2024-09-12 13:19:52 -04:00
|
|
|
use App\Models\License;
|
2024-05-15 00:31:24 -04:00
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
|
2024-09-12 13:19:52 -04:00
|
|
|
/** @mixin License */
|
2024-05-15 00:31:24 -04:00
|
|
|
class LicenseResource extends JsonResource
|
|
|
|
{
|
2024-09-12 13:19:52 -04:00
|
|
|
/**
|
|
|
|
* Transform the resource into an array.
|
|
|
|
*/
|
2024-05-15 00:31:24 -04:00
|
|
|
public function toArray(Request $request): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'created_at' => $this->created_at,
|
|
|
|
'updated_at' => $this->updated_at,
|
|
|
|
'id' => $this->id,
|
|
|
|
'name' => $this->name,
|
|
|
|
'link' => $this->link,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|