Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

get table column names sql laravel

use IlluminateSupportFacadesSchema;

use IlluminateSupportFacadesDB;

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

    // OR

    return Schema::getColumnListing($table);

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #table #column #names #sql #laravel
ADD COMMENT
Topic
Name
1+4 =