datatableName = $datatableName; // Fetch the DataTable configuration $datatableConfigQuery = DB::table('datatables')->where('name', $datatableName)->first(); if (!$datatableConfigQuery) { abort(404, 'DataTable configuration not found'); } // Store the decoded JSON as a plain array $this->datatableColumnsConfig = json_decode($datatableConfigQuery->columns_config, true); $this->datatableHeadersConfig = json_decode($datatableConfigQuery->column_headers, true); } public function updatedSearchTerms($value) { $this->dispatch('search-terms-updated', $this->searchTerms); } public function render() { return view('livewire.show-reports')->layout('components.layouts.datatables'); } }