Answers for "how to get a table columns laravel"

SQL
1

get table column names sql laravel

use IlluminateSupportFacadesSchema;

use IlluminateSupportFacadesDB;

public function getTableColumns($table)
{
    return DB::getSchemaBuilder()->getColumnListing($table);

    // OR

    return Schema::getColumnListing($table);

}
Posted by: Guest on December-05-2020

Code answers related to "how to get a table columns laravel"

Code answers related to "SQL"

Browse Popular Code Answers by Language