public function all() { $tables = Table::all(); if ($tables->isEmpty()) { return $this->responseNotFound(['Tables is empty']); } $tables = $this->parseTables($tables); return $this->responseOk($tables); }
/** * Show the Index Page * * @Get("/", as="index") */ public function index() { $rows = Table::all(); return view('index', compact('rows')); }