paginate()); } /** * Store a newly created resource in storage. */ public function store(GlobalSettingRequest $request) { try { //code... $data = GlobalSetting::create($request->validated()); return new GlobalSettingResource($data); } catch (\Exception $e) { return response()->json( [ "errors" => $e->getMessage() ] ); } } /** * Display the specified resource. */ public function show(string $id) { // } /** * Update the specified resource in storage. */ public function update(Request $request, string $id) { // } /** * Remove the specified resource from storage. */ public function destroy(string $id) { // } }