diff --git a/README.md b/README.md index 4a8dc454..b70de6bc 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,15 @@ php artisan vendor:publish --tag=reliese-models php artisan config:clear ``` +You might encounter the following error message: +*"No publishable resources for tag [reliese-models]."* + +In such cases, add the following line to the `'providers'` array in `config/app.php`: +``` +\Reliese\Coders\CodersServiceProvider::class, +``` +After updating the config cache, this should resolve the issue. + ## Models ![Generating models with artisan](https://cdn-images-1.medium.com/max/800/1*hOa2QxORE2zyO_-ZqJ40sA.png "Making artisan code my Eloquent models") diff --git a/config/models.php b/config/models.php index 2f2688d4..792a2e96 100644 --- a/config/models.php +++ b/config/models.php @@ -492,32 +492,36 @@ // ] // ], - /* - |-------------------------------------------------------------------------- - | Connection Specifics - |-------------------------------------------------------------------------- - | - | In this section you may define the default configuration for each model - | that will be generated from a specific connection. You can also nest - | database and table specific configurations. - | - | You may wish to use connection specific config for setting a parent - | model with a read only setup, or enforcing a different set of rules - | for a connection, e.g. using snake_case naming over CamelCase naming. - | - | This supports nesting with the following key configuration values, in - | reverse precedence order (i.e. the last one found becomes the value). - | - | connections.{connection_name}.property - | connections.{connection_name}.{database_name}.property - | connections.{connection_name}.{table_name}.property - | connections.{connection_name}.{database_name}.{table_name}.property - | - | These values will override those defined in the section above. - | - */ - -// 'connections' => [ + /** + *-------------------------------------------------------------------------- + * Connection Specifics + *-------------------------------------------------------------------------- + * + * In this section you may define the default configuration for each model + * that will be generated from a specific connection. You can also nest + * database and table specific configurations. + * + * You may wish to use connection specific config for setting a parent + * model with a read only setup, or enforcing a different set of rules + * for a connection, e.g. using snake_case naming over CamelCase naming. + * + * This supports nesting with the following key configuration values, + * in precedence order (i.e. the first one found becomes the value). + * + * @connections.{connection_name}.{table_name}.property + * @connections.{connection_name}.{database_name}.property + * @connections.{connection_name}.property + * {table_name}.property + * {database_name}.property + * *.property + * + * @see \Reliese\Coders\Model\Config::get() + * + * These values will override those defined in the section above. + * + */ + +// '@connections' => [ // 'read_only_external' => [ // 'parent' => \App\Models\ReadOnlyModel::class, // 'connection' => true,