Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add notes about field name constraint #136

Merged
merged 1 commit into from
Apr 2, 2024
Merged
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
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