| Package Data | |
|---|---|
| Maintainer Username: | kartmax-tech |
| Maintainer Contact: | sagar.chauhan@greenhonchos.com (Sagar Chauhan) |
| Package Create Date: | 2023-11-02 |
| Package Last Update: | 2023-11-03 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-02 03:00:18 |
| Package Statistics | |
|---|---|
| Total Downloads: | 303 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
A simple DSN parser for PHP projects.
Via Composer:
composer require kartmax/dsn-parser "^1.0.2"
Sample DSN
MYSQL_VX_CART_DB_DSN_READ_ONLY=mysql://user:password@127.0.0.1:3306/dbname?charset=utf8mb4
$dsnDetails = DsnParser::parse();
## Installation for Laravel
If you're using Laravel 5.5 and above, the package will automatically register its service provider.
For older versions of Laravel:
Add the service provider to the `providers` array in `config/app.php`:
```php
DsnParser\Providers\DsnServiceProvider::class,
Register the service provider in bootstrap/app.php:
$app->register(DsnParser\Providers\DsnServiceProvider::class);