auth(__FUNCTION__); return response()->json(MaterialService::index(), Response::HTTP_OK); } public function show($id) { $this->auth(__FUNCTION__); return response()->json(MaterialService::show($id), Response::HTTP_OK); } public function store(Request $request) { $this->auth(__FUNCTION__); return response()->json(MaterialService::store($request), Response::HTTP_CREATED); } public function update(Request $request, $id) { $this->auth(__FUNCTION__); return response()->json(MaterialService::update($request, $id), Response::HTTP_OK); } public function destroy($id) { $this->auth(__FUNCTION__); MaterialService::destroy($id); return response()->noContent(); } }