Skip to content

Commit e5bb729

Browse files
author
Jordan Hoff
committed
Adds lumen support
1 parent eb984ae commit e5bb729

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ composer require beyondcode/laravel-er-diagram-generator --dev
3535

3636
If you are using Laravel 5.5+, the package will automatically register the service provider for you.
3737

38+
If you are using Lumen, you will need to add the following to `bootstrap\app.php`:
39+
40+
```php
41+
\\ Register Service Providers
42+
$app->register(BeyondCode\ErdGenerator\ErdGeneratorServiceProvider::class);
43+
```
44+
3845
## Usage
3946

4047
By default, the package will automatically detect all models in your `app` directory that extend the Eloquent Model class. If you would like you explicitly define where your models are located, you can publish the configuration file using the following command.
@@ -43,6 +50,12 @@ By default, the package will automatically detect all models in your `app` direc
4350
php artisan vendor:publish --provider=BeyondCode\\ErdGenerator\\ErdGeneratorServiceProvider
4451
```
4552

53+
If you're using Lumen and you want to customize the config, you'll need to copy the config file from the vendor directory:
54+
55+
```bash
56+
cp ./vendor/beyondcode/laravel-er-diagram-generator/config/config.php config/erd-generator.php
57+
```
58+
4659
## Generating Diagrams
4760

4861
You can generate entity relation diagrams using the provided artisan command:

config/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* By default, the `app` directory will be scanned recursively for models.
88
*/
99
'directories' => [
10-
app_path(),
10+
base_path('app'),
1111
],
1212

1313
/*

src/ErdGeneratorServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function boot()
1313
{
1414
if ($this->app->runningInConsole()) {
1515
$this->publishes([
16-
__DIR__.'/../config/config.php' => config_path('erd-generator.php'),
16+
__DIR__.'/../config/config.php' => base_path('config/erd-generator.php'),
1717
], 'config');
1818
}
1919
}

0 commit comments

Comments
 (0)