From 846d83a0b1304d6e5ae01b0d77adc71a0f556dbd Mon Sep 17 00:00:00 2001 From: maiga-soluciones Date: Wed, 21 Aug 2024 09:28:23 -0300 Subject: [PATCH] Update Datatable.php Fix issue with Doctrine new methods on Laravel 11 --- src/Console/Datatable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/Datatable.php b/src/Console/Datatable.php index d396fce1..d4fa4579 100644 --- a/src/Console/Datatable.php +++ b/src/Console/Datatable.php @@ -117,7 +117,7 @@ private function generateColumnsForModel($model) foreach ($fields as $field) { if (! $this->option('nodb')) { - $type = $connection->getDoctrineColumn($model->getTable(), $field)->getType()->getName(); + $type = $connection->getSchemaBuilder()->getColumnType($model->getTable(), $field); } else { $type = preg_match('#_at$#', $field) ? 'datetime' : 'default'; }