use config helper instead of env in application code

This commit is contained in:
Ethan Brace
2020-04-26 06:07:27 -04:00
parent 16092f657c
commit 6a11f130c2
18 changed files with 29 additions and 23 deletions

View File

@ -27,8 +27,10 @@ class Database extends Controller
*/
public function store(Request $request)
{
$connection = config('database.default','mysql');
$host = $request['hostname'];
$port = env('DB_PORT', '3306');
$port = config("database.connections.$connection.port", '3306');
$database = $request['database'];
$username = $request['username'];
$password = $request['password'];