I have multiple database defined in my laravel installation inside database.php and I would like to loop all database and perform the same operation in everyone.
Something like this:
foreach ($somethingunknown as $connection){
DB::connection($connection)->table('users')->where('id','=',1)->delete();
}
What is the best way to get all database name? Maybe if possible something with wildcard support.
->where('id,'=',1)is a syntax error, should be->where('id','=',1)(missing a'afterid)