File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/app/Http/Controllers/Operations Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,12 @@ protected function autoSetupShowOperation()
102102
103103 // if the model has timestamps, add columns for created_at and updated_at
104104 if ($ this ->crud ->get ('show.timestamps ' ) && $ this ->crud ->model ->usesTimestamps ()) {
105- $ this ->crud ->column ($ this ->crud ->model ->getCreatedAtColumn ())->type ('datetime ' );
106- $ this ->crud ->column ($ this ->crud ->model ->getUpdatedAtColumn ())->type ('datetime ' );
105+ if ($ this ->crud ->model ->getCreatedAtColumn ()) {
106+ $ this ->crud ->column ($ this ->crud ->model ->getCreatedAtColumn ())->type ('datetime ' );
107+ }
108+ if ($ this ->crud ->model ->getUpdatedAtColumn ()) {
109+ $ this ->crud ->column ($ this ->crud ->model ->getUpdatedAtColumn ())->type ('datetime ' );
110+ }
107111 }
108112
109113 // if the model has SoftDeletes, add column for deleted_at
You can’t perform that action at this time.
0 commit comments