Answers for "laravel get all table name"

PHP
1

get table name from model laravel

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

get all tables laravel

$tables = DB::select('SHOW TABLES');
foreach($tables as $table)
{
      echo $table->Tables_in_db_name;
}
Posted by: Guest on June-28-2021

Code answers related to "laravel get all table name"

Browse Popular Code Answers by Language