Answers for "how to print table name in laravel"

PHP
0

call table name in model laravel

protected $table = 'table_name';
Posted by: Guest on October-24-2021
1

get table column names sql laravel

use Illuminate\Support\Facades\Schema;

use Illuminate\Support\Facades\DB;

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 print table name in laravel"

Browse Popular Code Answers by Language