DocsDeveloper guideBuild an add-on
A settings page
Give your add-on its own settings screen under its own URL, and store small values as configuration parameters.
1 min read
- Add a GET route for the page and a PUT route to save it (Hello Notes:
/hello/settings). - Read and write values with
ConfigParameter::get($key, $default)andConfigParameter::set($key, $value)(app/Models/ConfigParameter.php:43,:60). Prefix keys with your slug. - Put the page in your menu under a Configuration group, and gate it with your manage ability.
Larger add-ons keep their settings on their own screens too: Employees at /employees/config/settings, Planning at /planning/settings (their routes.php).