PHPackages                             alexwijn/laravel-database-url - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. alexwijn/laravel-database-url

ActiveLibrary

alexwijn/laravel-database-url
=============================

Automatically parse and load the DATABASE\_URL

01.5kPHP

Since Sep 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Alexwijn/laravel-database-url)[ Packagist](https://packagist.org/packages/alexwijn/laravel-database-url)[ RSS](/packages/alexwijn-laravel-database-url/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Database URL
--------------------

[](#laravel-database-url)

[![Packagist License](https://camo.githubusercontent.com/356fd2508816da3dce121a2fd5f79c415270cec878144b4d432d325e60eae353/68747470733a2f2f706f7365722e707567782e6f72672f616c657877696a6e2f6c61726176656c2d64617461626173652d75726c2f6c6963656e73652e706e67)](http://choosealicense.com/licenses/mit/)[![Latest Stable Version](https://camo.githubusercontent.com/783b47e22cadf6f3b07db36fe53068182623cd202344aafe0c47a293e1e96b8e/68747470733a2f2f706f7365722e707567782e6f72672f616c657877696a6e2f6c61726176656c2d64617461626173652d75726c2f76657273696f6e2e706e67)](https://packagist.org/packages/alexwijn/laravel-database-url)[![Total Downloads](https://camo.githubusercontent.com/71cb09f96d7347bb1cb41cb056aef649a7db8ad624af49865bd2a509efaa0f04/68747470733a2f2f706f7365722e707567782e6f72672f616c657877696a6e2f6c61726176656c2d64617461626173652d75726c2f642f746f74616c2e706e67)](https://packagist.org/packages/alexwijn/laravel-database-url)

This package will provide automatically parse and configure you Laravel application to use the custom environment variables that commonly used for services like Heroku and Docker.

Installation
------------

[](#installation)

Require this package with composer.

```
composer require alexwijn/laravel-database-url
```

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

### Laravel 5.5+:

[](#laravel-55)

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
Alexwijn\DatabaseUrl\ServiceProvider::class,
```

Supported environment variables
-------------------------------

[](#supported-environment-variables)

At the moment we support the following configurations:

- *DATABASE\_URL* - Eg. mysql://username:password@localhost/database
- *DATABASE\_URL* - Eg. mariadb://username:password@localhost/database
- *DATABASE\_URL* - Eg. postgres://username:password@localhost/database
- *REDIS\_URL* - Eg. redis://redis:password@localhost/0
- *ELASTICSEARCH\_URL* - Eg. tcp://localhost:9200

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/33f00a18eb1ad1b257d27f8d2185f5599c8bf4a11f31bb7af13a5b31fc6263f8?d=identicon)[Alex Wijnholds](/maintainers/Alex%20Wijnholds)

---

Top Contributors

[![Alexwijn](https://avatars.githubusercontent.com/u/1023654?v=4)](https://github.com/Alexwijn "Alexwijn (1 commits)")[![StefanoGroenland](https://avatars.githubusercontent.com/u/6575921?v=4)](https://github.com/StefanoGroenland "StefanoGroenland (1 commits)")

### Embed Badge

![Health badge](/badges/alexwijn-laravel-database-url/health.svg)

```
[![Health](https://phpackages.com/badges/alexwijn-laravel-database-url/health.svg)](https://phpackages.com/packages/alexwijn-laravel-database-url)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
