33 lines
995 B
PHP
33 lines
995 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources\Call;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class CallResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'operator_id' => $this->operator_id,
|
|
'operator_full_name' => $this->operator_full_name,
|
|
'operator_username' => $this->operator_username,
|
|
'telephone_id' => $this->telephone_id,
|
|
'caller_phone_number' => $this->caller_phone_number,
|
|
'description' => $this->description,
|
|
'category_id' => $this->category_id,
|
|
'category_name' => $this->category_name,
|
|
'subcategory_id' => $this->subcategory_id,
|
|
'subcategory_name' => $this->subcategory_name,
|
|
'created_at' => $this->created_at,
|
|
];
|
|
}
|
|
}
|