mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
Part of moving back to PHPStan level 5 means we can remove some of these. They're very busy and don't give enough context to outweigh the ugly.
29 lines
660 B
PHP
29 lines
660 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources\Api\V0;
|
|
|
|
use App\Models\License;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
/** @mixin License */
|
|
class LicenseResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'type' => 'license',
|
|
'id' => $this->id,
|
|
'attributes' => [
|
|
'name' => $this->name,
|
|
'link' => $this->link,
|
|
'created_at' => $this->created_at,
|
|
'updated_at' => $this->updated_at,
|
|
],
|
|
];
|
|
}
|
|
}
|