testing connect database to php laravel code example Example: check which database connect laravel DB::connection();