Last active
October 27, 2020 12:12
-
-
Save kjohnson/7193ff80e3968bb740c0 to your computer and use it in GitHub Desktop.
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
<?php | |
// Get the ID for a Model | |
$id = $model->get_id(); | |
// Get a single setting for a Model by key | |
$setting = $model->get_setting( 'key' ); | |
// Get all settings for a model | |
$settings = $model->get_settings(); | |
// Get extra data stored with a submission. | |
$more_data = $model->get_extra_value( 'more_data' ); | |
// Update a single setting for a model and save | |
$model->update_setting( 'key', 'value' )->save(); | |
// Update an array of settings for a mdoel and save | |
$model->update_settings( $settings )->save(); | |
// Delete a model | |
$model->delete(); | |
// Save changes to a model | |
$model->save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have a small misspelling on one of your descriptions.
Line 18:
// Update an array of settings for a mdoel and save
// Update an array of settings for a model and save