auth(__FUNCTION__); return response()->json($this->get(Example::class)->get(), Response::HTTP_OK); } public function create() { $this->auth(__FUNCTION__); // ... } public function store(Request $request) { $this->auth(__FUNCTION__); return response()->json(ExampleService::store($request->all()), Response::HTTP_CREATED); } public function show($id) { $this->auth(__FUNCTION__); return response()->json($this->get(Example::class, $id), Response::HTTP_OK); } public function edit($id) { $this->auth(__FUNCTION__); // ... } public function update(Request $request, $id) { $this->auth(__FUNCTION__); return response()->json(ExampleService::update($id, $request->all()), Response::HTTP_OK); } public function destroy($id) { $this->auth(__FUNCTION__); return response()->json(ExampleService::destroy($id), Response::HTTP_NO_CONTENT); } }