From 5f9ed68e090456591ed1762faf9b88f88570a7eb Mon Sep 17 00:00:00 2001 From: Toby Allen Date: Thu, 6 Nov 2025 08:08:32 +0000 Subject: [PATCH 1/2] Layout calling of migrations Make easier to see php artisan call in readme. --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4957fa0..7fb46d7 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,10 @@ Default name for the settings table - when you use the `HasSettingsTable` Your models should use the `HasSettingsField` or `HasSettingsTable` trait. #### Option 1 - `HasSettingsField` trait -Run the `php artisan model-settings:model-settings-field` in order to create a migration file for a table.\ +Run the command below in order to create a migration file for a table.\ + +> php artisan model-settings:model-settings-field + This command will create a json field (default name `settings`, from config) for the mentioned table. You can choose another than default, in this case you have to specify it in you model. @@ -104,7 +107,11 @@ class User extends Model } ``` #### Option 2 - `HasSettingsTable` trait -Run before the command `php artisan model-settings:model-settings-table`.\ +Run the command below to create the settings table. + +> php artisan model-settings:model-settings-table + + The command will copy for you the migration class to create the table where the setting values will be stored.\ 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!**) ```php From ca237e717ae3449c5156f13a9e0b39fd31d8b0c1 Mon Sep 17 00:00:00 2001 From: Toby Allen Date: Thu, 6 Nov 2025 17:53:38 +0000 Subject: [PATCH 2/2] specify language - allows copy clip --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7fb46d7..7e75317 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,9 @@ Your models should use the `HasSettingsField` or `HasSettingsTable` trait. #### Option 1 - `HasSettingsField` trait Run the command below in order to create a migration file for a table.\ -> php artisan model-settings:model-settings-field +````bash +php artisan model-settings:model-settings-field +```` This command will create a json field (default name `settings`, from config) for the mentioned table. @@ -108,9 +110,9 @@ class User extends Model ``` #### Option 2 - `HasSettingsTable` trait Run the command below to create the settings table. - -> php artisan model-settings:model-settings-table - +````bash + php artisan model-settings:model-settings-table +```` The command will copy for you the migration class to create the table where the setting values will be stored.\ 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!**)