backend registration step 1

This commit is contained in:
CheeSiong
2020-10-24 10:31:52 +08:00
parent ec4dc051eb
commit eac5ffda7b
48 changed files with 8960 additions and 4 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class UserResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'name' => $this->name,
'email' => $this->email,
'type' => (int) $this->type,
'status' => (int) $this->status
];
}
}