Skip to content

Commit 165a510

Browse files
authored
Minor layout change readme.md (#133)
* Layout calling of migrations Make easier to see php artisan call in readme. * specify language - allows copy clip
1 parent 1c94d15 commit 165a510

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ Default name for the settings table - when you use the `HasSettingsTable`
7979
Your models should use the `HasSettingsField` or `HasSettingsTable` trait.
8080

8181
#### Option 1 - `HasSettingsField` trait <a name="update_models_1"></a>
82-
Run the `php artisan model-settings:model-settings-field` in order to create a migration file for a table.\
82+
Run the command below in order to create a migration file for a table.\
83+
84+
````bash
85+
php artisan model-settings:model-settings-field
86+
````
87+
8388
This command will create a json field (default name `settings`, from config) for the mentioned table.
8489

8590
You can choose another than default, in this case you have to specify it in you model.
@@ -104,7 +109,11 @@ class User extends Model
104109
}
105110
```
106111
#### Option 2 - `HasSettingsTable` trait <a name="update_models_2"></a>
107-
Run before the command `php artisan model-settings:model-settings-table`.\
112+
Run the command below to create the settings table.
113+
````bash
114+
php artisan model-settings:model-settings-table
115+
````
116+
108117
The command will copy for you the migration class to create the table where the setting values will be stored.\
109118
The default name of the table is `model_settings`; change the config or env value `MODEL_SETTINGS_TABLE_NAME` if you want to rewrite the default name (**before you run the command!**)
110119
```php

0 commit comments

Comments
 (0)