make structure the fetch database in laravel code example
Example 1: How to request and display data from db in larave
$users = DB::table('users')->get();
foreach($users as $key => $value)
{
//to get each columns value
//$value->name
}
Example 2: db name laravel
DB::connection()->getDatabaseName() //laravel