remove compose file to another repo

This commit is contained in:
2025-05-05 15:30:11 +03:30
parent 02ef3ae2ad
commit 3b739558ee
179 changed files with 130 additions and 341 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Http\Resources\Admin;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class UserResource extends JsonResource
{
/**
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'full_name' => $this->full_name,
'username' => $this->username,
'gender' => $this->gender,
'email' => $this->email,
'phone_number' => $this->phone_number,
'avatar' => $this->avatar,
'national_id' => $this->national_id,
'position' => $this->position,
'province_id' => $this->province_id,
'province_name' => $this->province_name,
'role' => $this->getRoleNames()->first(),
'permissions' => $this->getAllPermissions()->pluck('name'),
'telephone_id' => $this->telephone_id
];
}
}