Answers for "eleoquent db::table( get all"

CSS
1

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
2

get all data eloquent laravel

Blog::all();

//example usage.
$posts = Blog::all();
Posted by: Guest on October-28-2020

Browse Popular Code Answers by Language