We think you might be interested in this job:

Lead Full-Stack Developer

SPARK Business Works

Mayowa Emmanuel Oludare 1 hour ago· 1 min readHow to Set Database Configuration Dynamically in your Laravel Application. Sometimes we may find ourselves in situations where we have to modify our database connection/configuration at runtime. Some applications require alot of database and sometimes the required database can only be determined at runtime. A typical example from my experience was in School Management System that required a separate Database for each school.

A better approach is to only modify only the configuration array key of interest, in this case the database name of your mysql connection.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Community Partners