auth(__FUNCTION__); return response()->json(MotivoService::create(), Response::HTTP_OK); } public function store() { $this->auth(__FUNCTION__); return response()->json(MotivoService::store(), Response::HTTP_CREATED); } public function datatable() { return MotivoService::datatable()->skipTotalRecords()->toJson(); } public function edit($id) { $this->auth(__FUNCTION__); return response()->json(MotivoService::edit($id), Response::HTTP_OK); } public function update($id) { $this->auth(__FUNCTION__); return response()->json(MotivoService::update($id), Response::HTTP_OK); } public function bloquear($id) { $this->auth(__FUNCTION__); return response()->json(MotivoService::bloquear($id), Response::HTTP_OK); } public function destroy($id) { $this->auth(__FUNCTION__); return response()->json(MotivoService::destroy($id), Response::HTTP_NO_CONTENT); } public function autocomplete() { return datatables() ->of(MotivoService::autocomplete()) ->make(true); } }