mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
Refringe
2cca45bcea
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.
31 lines
829 B
PHP
31 lines
829 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Models\Mod;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
/** @mixin Mod */
|
|
class ModResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'name' => $this->name,
|
|
'slug' => $this->slug,
|
|
'description' => $this->description,
|
|
'source_code_link' => $this->source_code_link,
|
|
'license_id' => $this->license_id,
|
|
'license' => new LicenseResource($this->whenLoaded('license')),
|
|
'created_at' => $this->created_at,
|
|
'updated_at' => $this->updated_at,
|
|
'published_at' => $this->published_at,
|
|
];
|
|
}
|
|
}
|