Replies: 1 comment
-
This error occurred because you published the views in your code, which is not recommended. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Livewire PowerGrid version
v6.5.0
Livewire version
v3.6.4
Laravel version
12.21.0
Which PHP version are you using?
PHP 8.2
Which Theme are you using?
Bootstrap 5
Have you published the resource files and customized them? (php artisan vendor:publish)
Yes
What is the problem?
i have got an error when upgrade powergrid on my laravel project

Code snippets
showSearchInput() ->withoutLoading() ->showToggleColumns(), PowerGrid::footer() ->showPerPage(perPage: 10, perPageValues: [0, 50, 100, 500]) ->showRecordCount(mode: 'full') ->pageName('jabPage'), ]; } public function hydrate(): void { sleep(1); } public function noDataLabel(): string|View { return 'We could not find any data matching your search.'; } public function datasource(): Builder { return DB::table('pegawai') ->select( 'uuid', 'foto_pegawai', 'nama_pegawai', 'nip_nipppk_niku', 'nik', 'status_kepegawaian', ) ->whereNull('deleted_at') ->orderBy('created_at', 'ASC'); } public function fields(): PowerGridFields { return PowerGrid::fields() ->add('uuid') ->add( 'foto_pegawai', fn ($item) => ($item->foto_pegawai != null) ? ' . ')
' : '![]()
' ) ->add('nama_pegawai') ->add('nip_nipppk_niku') ->add('nik') ->add('status_kepegawaian'); } public function columns(): array { return [ Column::make('#', 'uuid')->index(), Column::make('Foto', 'foto_pegawai'), Column::make('Nama Pegawai', 'nama_pegawai') ->sortable() ->searchable(), Column::make('NIP/NI PPPK/ NIKU', 'nip_nipppk_niku') ->sortable() ->searchable(), Column::make('NIK', 'nik') ->sortable() ->searchable(), Column::make('Status Kepegawaian', 'status_kepegawaian') ->sortable() ->searchable(), Column::action('Action') ]; } public function filters(): array { return [ Filter::select('nama_pegawai', 'nama_pegawai') ->dataSource( ModelsPegawaiTable::select('nama_pegawai') ->groupBy('nama_pegawai') ->get() ) ->optionLabel('nama_pegawai') ->optionValue('nama_pegawai'), Filter::select('nip_nipppk_niku', 'nip_nipppk_niku') ->dataSource( ModelsPegawaiTable::select('nip_nipppk_niku') ->groupBy('nip_nipppk_niku') ->get() ) ->optionLabel('nip_nipppk_niku') ->optionValue('nip_nipppk_niku'), Filter::select('nik', 'nik') ->dataSource( ModelsPegawaiTable::select('nik') ->groupBy('nik') ->get() ) ->optionLabel('nik') ->optionValue('nik'), ]; } public function actionsFromView($row): View { return view('components.action-button.detail-riwayat-jabatan-action-button', ['row' => $row]); } public function detailriwayatjabatanpegawai(String $uuid) { $this->redirectRoute('detail-riwayat-jabatan-pegawai', ['id' => $uuid], navigate: true); } } ### How do you expect it to work? the table show correctly like before upgrade ### Please confirm (incomplete submissions will not be addressed) - [X] I have provided easy and step-by-step instructions to reproduce the bug. - [X] I have provided code samples as text and NOT images. - [X] I understand my bug report will be removed if I haven't met the criteria above.Beta Was this translation helpful? Give feedback.
All reactions