示例#1
1
 public function destroy()
 {
     $this->service->destroy(scrud()->params()->all());
     return response()->json([], 204);
 }
示例#2
0
 public function store()
 {
     $data = $this->service->create(scrud()->params()->all());
     return response()->json($this->toArray($data), 201);
 }
示例#3
0
 public function selectSearch($service)
 {
     $data = $service->search(scrud()->paramsSearch()->all());
     return response()->json($this->toArray($data), 200);
 }
示例#4
0
 public function update()
 {
     $updated = $this->service->update(scrud()->params()->all());
     return response()->json([], $updated ? 204 : 200);
 }
示例#5
0
 public function show()
 {
     $data = $this->service->read(scrud()->params()->all());
     return response()->json($this->toArray($data), 200);
 }