get field name mysql laravel code example
Example 1: laravel show table columns
Schema::getColumnListing($table);
Example 2: laravel get column field name
// You may need to run
composer require doctrine/dbal
// Retrieve laravel column type
$columnType = DB::getSchemaBuilder()->getColumnType($tableName, $colName)
// for example
$columnType = DB::getSchemaBuilder()->getColumnType('user', 'age')