1. Go to this page and download the library: Download mortezamasumi/fb-setting library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mortezamasumi / fb-setting example snippets
use Mortezamasumi\FbSetting\FbSettingPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FbSettingPlugin::make(),
]);
}
// Simple value, falling back to a default when missing or inactive:
$schoolName = __fb_setting('school_name', 'My School');
// Nested attributes:
$phone = __fb_setting('contact', null, 'phone');
// Placeholder substitution:
$message = __fb_setting('sms_template', 'Hello :name', values: ['name' => $user->name]);