Krixnaas
Posted on May 25, 2022
Route::get('/dbinfo', function(){
$databaseName = \DB::connection()->getDatabaseName();
dd($databaseName);
});
Route::get('/info', function(){
return response()->json([
'stuff' => phpinfo()
]);
});
If it still giving previous database name then clear config and restart the Laravel app again
💖 💪 🙅 🚩
Krixnaas
Posted on May 25, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
undefined How to Leverage AWS Tools for Reliable Backups and Monitoring of Your Laravel Application
November 2, 2024
undefined How do you create a full backend API for an eCommerce website using PHP Laravel?
October 7, 2024