forge/app/Http/Resources/Api/V0/UserRoleResource.php
Refringe 2cca45bcea
Removes Array Definition Docblock Information
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.
2024-09-17 13:30:11 -04:00

29 lines
681 B
PHP

<?php
namespace App\Http\Resources\Api\V0;
use App\Models\UserRole;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
/** @mixin UserRole */
class UserRoleResource extends JsonResource
{
/**
* Transform the resource into an array.
*/
public function toArray(Request $request): array
{
return [
'type' => 'user_role',
'id' => $this->id,
'attributes' => [
'name' => $this->name,
'short_name' => $this->short_name,
'description' => $this->description,
'color_class' => $this->color_class,
],
];
}
}