Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
56 changes: 30 additions & 26 deletions config/models.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down