This commit is contained in:
xiaomlove
2021-04-19 20:13:21 +08:00
parent 736d42cd5c
commit 38afa63e3d
23 changed files with 1051 additions and 60 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class ExamResource 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,
'description' => $this->description,
'begin' => $this->begin,
'end' => $this->end,
'filters' => $this->filters,
'requires' => $this->requires,
'status' => $this->status,
];
}
}