Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set database, server, username and password in Laravel 5.1?

I am trying to set the database name, server name, username and password in Laravel via an html form (similar to the way that this can be done in WordPress). Is there any way to do this with Laravel?

like image 436
scott Avatar asked Nov 15 '25 09:11

scott


1 Answers

It is possible to do it in 2 ways in Laravel:

1) Go to <projectname>/config/database.php and search for 'connections' =>

2) Set it in .env file on the root.

like image 85
Disha V. Avatar answered Nov 18 '25 04:11

Disha V.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!