Skip to content

Commit

Permalink
Merge pull request #136 from Laravel-Backpack/add-docs-about-field-name
Browse files Browse the repository at this point in the history
add notes about field name constraint
  • Loading branch information
pxpm authored Apr 2, 2024
2 parents 1d80f09 + 15f7976 commit 1bbb459
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Settings are stored in the database in the "settings" table. Its columns are:
- name (ex: Contact form email address)
- description (ex: The email address that all emails go to.)
- value (ex: admin@laravelbackpack.com)
- field (Backpack CRUD field configuration in JSON format. https://backpackforlaravel.com/docs/crud-fields#default-field-types)
- field (Backpack CRUD field configuration in JSON format. The "name" of the field is **mandatory** to be "value") - see the field types and their configuration code on https://backpackforlaravel.com/docs/crud-fields#default-field-types
- active (1 or 0)
- created_at
- updated_at
Expand All @@ -88,6 +88,8 @@ For example, you can override the Backpack `show_powered_by` setting in `/config
| field | {"name":"value","label":"Value","type":"checkbox"} |
| active | 1 |

**NOTE**: The `field` column should be a JSON string. The `name` key in the JSON string should be `value`. Using any other key will not work.

3. Open up the `app/Providers/AppServiceProvider` file, and add the below lines:

```diff
Expand Down

0 comments on commit 1bbb459

Please sign in to comment.