diff --git a/CHANGELOG.md b/CHANGELOG.md index af6b7cb..d4411eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,14 @@ All notable changes to `laravel-morph-map-generator` will be documented in this file +## 1.0.1 - 2020-11-20 + +- update configuration styling + ## 1.0.1 - 2020-11-02 - fix for event driven models - ## 1.0.0 - 2020-10-30 - initial release diff --git a/README.md b/README.md index 9ea78d2..650efd0 100644 --- a/README.md +++ b/README.md @@ -46,25 +46,15 @@ This is the contents of the published config file: ```php return [ /* - |-------------------------------------------------------------------------- - | Autogenerate - |-------------------------------------------------------------------------- - | - | When enabled, morph maps will be automatically generated when the - | application is booted. - | + * When enabled, morph maps will be automatically generated when the + * application is booted. */ 'autogenerate' => true, /* - |-------------------------------------------------------------------------- - | Paths - |-------------------------------------------------------------------------- - | - | Within these paths, the package will search for models to be included - | in the generated morph map. - | + * Within these paths, the package will search for models to be included + * in the generated morph map. */ 'paths' => [ @@ -72,50 +62,35 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Base models - |-------------------------------------------------------------------------- - | - | Only models that extend from one of the base models defined here will - | be included in the generated morph map. - | + * Only models that extend from one of the base models defined here will + * be included in the generated morph map. */ 'base_models' => [ - Illuminate\Database\Eloquent\Model::class + Illuminate\Database\Eloquent\Model::class, ], /* - |-------------------------------------------------------------------------- - | Ignored models - |-------------------------------------------------------------------------- - | - | When generating the morph map, these models will not be included. - | + * When generating the morph map, these models will not be included. */ 'ignored_models' => [], /* - |-------------------------------------------------------------------------- - | Cache - |-------------------------------------------------------------------------- - | - | Morph maps can be cached, there's a `FilesystemMorphMapCacheDriver` which - | stores the morph map as a file in a directory or you can also use the - | Laravel built-in cache by using `LaravelMorphMapCacheDriver`. - | - | Both drivers have their own config: - | - `FilesystemMorphMapCacheDriver` requires a `path` to store the file - | - `LaravelMorphMapCacheDriver` requires a `key` for storage - | + * Morph maps can be cached, there's a `FilesystemMorphMapCacheDriver` which + * stores the morph map as a file in a directory or you can also use the + * Laravel built-in cache by using `LaravelMorphMapCacheDriver`. + * + * Both drivers have their own config: + * - `FilesystemMorphMapCacheDriver` requires a `path` to store the file + * - `LaravelMorphMapCacheDriver` requires a `key` for storage */ 'cache' => [ 'type' => Spatie\LaravelMorphMapGenerator\Cache\FilesystemMorphMapCacheDriver::class, 'path' => storage_path('app/morph-map-generator'), - ] + ], ]; ``` diff --git a/config/morph-map-generator.php b/config/morph-map-generator.php index 998066f..eec13fa 100644 --- a/config/morph-map-generator.php +++ b/config/morph-map-generator.php @@ -2,25 +2,15 @@ return [ /* - |-------------------------------------------------------------------------- - | Autogenerate - |-------------------------------------------------------------------------- - | - | When enabled, morph maps will be automatically generated when the - | application is booted. - | + * When enabled, morph maps will be automatically generated when the + * application is booted. */ 'autogenerate' => true, /* - |-------------------------------------------------------------------------- - | Paths - |-------------------------------------------------------------------------- - | - | Within these paths, the package will search for models to be included - | in the generated morph map. - | + * Within these paths, the package will search for models to be included + * in the generated morph map. */ 'paths' => [ @@ -28,48 +18,33 @@ ], /* - |-------------------------------------------------------------------------- - | Base models - |-------------------------------------------------------------------------- - | - | Only models that extend from one of the base models defined here will - | be included in the generated morph map. - | + * Only models that extend from one of the base models defined here will + * be included in the generated morph map. */ 'base_models' => [ - Illuminate\Database\Eloquent\Model::class + Illuminate\Database\Eloquent\Model::class, ], /* - |-------------------------------------------------------------------------- - | Ignored models - |-------------------------------------------------------------------------- - | - | When generating the morph map, these models will not be included. - | + * When generating the morph map, these models will not be included. */ 'ignored_models' => [], /* - |-------------------------------------------------------------------------- - | Cache - |-------------------------------------------------------------------------- - | - | Morph maps can be cached, there's a `FilesystemMorphMapCacheDriver` which - | stores the morph map as a file in a directory or you can also use the - | Laravel built-in cache by using `LaravelMorphMapCacheDriver`. - | - | Both drivers have their own config: - | - `FilesystemMorphMapCacheDriver` requires a `path` to store the file - | - `LaravelMorphMapCacheDriver` requires a `key` for storage - | + * Morph maps can be cached, there's a `FilesystemMorphMapCacheDriver` which + * stores the morph map as a file in a directory or you can also use the + * Laravel built-in cache by using `LaravelMorphMapCacheDriver`. + * + * Both drivers have their own config: + * - `FilesystemMorphMapCacheDriver` requires a `path` to store the file + * - `LaravelMorphMapCacheDriver` requires a `key` for storage */ 'cache' => [ 'type' => Spatie\LaravelMorphMapGenerator\Cache\FilesystemMorphMapCacheDriver::class, 'path' => storage_path('app/morph-map-generator'), - ] + ], ];