1- # Laravel Database URI
2- Drop-in package to translate a database URI into database config values. No more need to add logic to your
1+ # Laravel Database URL
2+ Drop-in package to translate a database URL into database config values. No more need to add logic to your
33` config/database.php ` file.
44
5- This is meant to help prevent the need for manually parsing database URIs , like the ones that come from Heroku or AWS.
6- It will take a URI and assign host, password, username, port, (etc.) components to the default driver or
5+ This is meant to help prevent the need for manually parsing database URLs , like the ones that come from Heroku or AWS.
6+ It will take a URL and assign host, password, username, port, (etc.) components to the default driver or
77specific driver(s) of your choosing.
88
99This __ will override__ , at runtime, any ` default ` database connection values for ` host ` , ` port ` , ` username ` , ` password ` , and ` database `
@@ -14,12 +14,12 @@ This __will override__, at runtime, any `default` database connection values for
1414- Laravel >= 5.6
1515
1616## Installation
17- ` $ composer require rootinc/laravel-db-uri `
17+ ` $ composer require rootinc/laravel-db-url `
1818
1919## Configuration
2020The package will automatically map the parsed values from the environment variable ` DATABASE_URL ` to the ` default ` database connection.
2121
22- Add a ` DATABASE_URL ` entry to your ` .env ` or server environment with a URI to your default database.
22+ Add a ` DATABASE_URL ` entry to your ` .env ` or server environment with a URL to your default database.
2323` DATABASE_URL=postgresql://username:password@localhost:5432/database-name `
2424
2525This will overwrite database connection values for ` host ` , ` port ` , ` username ` , ` password ` , and ` database `
@@ -28,12 +28,12 @@ This will overwrite database connection values for `host`, `port`, `username`, `
2828## Customization
2929Override default behaviour by publishing the config file and setting values.
3030
31- ` $ php artisan vendor:publish --tag=db-uri `
31+ ` $ php artisan vendor:publish --tag=db-url `
3232
3333Set any database connections by supplying ` default ` or the key path, like ` connections.pgsql ` , or ` redis `
3434to have a URL mapped onto the connection at that key path.
3535
36- config/db-uri .php
36+ config/db-url .php
3737```
3838return [
3939 'default' => 'SOME_DATABASE_URL', // "default" resolves key path from default key
0 commit comments