-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from Laravel-Backpack/add-docs-about-field-name
add notes about field name constraint
- Loading branch information
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: [email protected]) | ||
- 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 | ||
|
@@ -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 | ||
|