Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get database columns 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: #database #columns #laravel
ADD COMMENT
Topic
Name
3+6 =