File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -27,19 +27,19 @@ protected function formatCardForDisplay(Model $model): array
2727
2828 $ card = [
2929 'id ' => $ model ->getKey (),
30- 'title ' => $ model->{ $ titleField} ,
31- 'column ' => $ model->{ $ columnField} ,
30+ 'title ' => data_get ( $ model, $ titleField) ,
31+ 'column ' => data_get ( $ model, $ columnField) ,
3232 ];
3333
34- if ($ descriptionField !== null && isset ( $ model ->{ $ descriptionField }) ) {
35- $ card ['description ' ] = $ model->{ $ descriptionField} ;
34+ if ($ descriptionField !== null ) {
35+ $ card ['description ' ] = data_get ( $ model, $ descriptionField) ;
3636 }
3737
3838 foreach ($ cardAttributes as $ key => $ label ) {
3939 $ field = is_string ($ key ) ? $ key : $ label ;
4040 $ card ['attributes ' ][$ field ] = [
4141 'label ' => is_string ($ key ) ? $ label : $ field ,
42- 'value ' => $ model->{ $ field} ,
42+ 'value ' => data_get ( $ model, $ field) ,
4343 ];
4444 }
4545
Original file line number Diff line number Diff line change 1111use Filament \Forms \Contracts \HasForms ;
1212use Filament \Notifications \Notification ;
1313use Illuminate \Support \Collection ;
14- use Illuminate \Support \Facades \Gate ;
1514use Illuminate \View \View ;
1615use Livewire \Attributes \Locked ;
1716use Livewire \Component ;
You can’t perform that action at this time.
0 commit comments