Answers for "laravel get all table names"

PHP
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
1

get table name from model laravel

$item = new Item;
$table = $item->getTable();
print_r($table);
Posted by: Guest on October-11-2020
-1

laravel list of tables

DB::select('SHOW TABLES')
Posted by: Guest on October-29-2020

Code answers related to "laravel get all table names"

Browse Popular Code Answers by Language