You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
user_center/app/Http/Resources/Employee.php

35 lines
1003 B

4 years ago
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class Employee extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'username' => $this->username,
'nickname' => $this->nickname,
'company_id' => $this->company_id,
'group_id' => $this->group_id,
'phone' => $this->phone,
'monthly_working_days' => $this->monthly_working_days,
'entry_date' => $this->entry_date,
'official_date' => $this->official_date,
'resign_date' => $this->resign_date,
'probation_salary' => $this->probation_salary,
'official_salary' => $this->official_salary,
'is_outer' => $this->is_outer,
'status' => $this->status,
];
}
}