googleSheetService = $googleSheetService; } /** * Display a listing of the resource. */ public function index() { $data = $this->googleSheetService->getSheetData("Sheet1!A2:BB2"); $result = [ "data" => $data, "last_row" => $this->googleSheetService->getLastRow("Sheet1"), "header" => $this->googleSheetService->getHeader("Sheet1"), "last_column" => $this->googleSheetService->getLastColumn("Sheet1") ]; return response()->json($result); } /** * Store a newly created resource in storage. */ public function store(Request $request) { // } /** * 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) { // } }