PHP code example of eleven59 / backpack-settings-extended

1. Go to this page and download the library: Download eleven59/backpack-settings-extended 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/ */

    

eleven59 / backpack-settings-extended example snippets


'routes' => [
    'url-slug' => 'type-column-value',
]

'field-defaults' => [
    'image' => [
        'crop' => true,
        'withFiles' => [
            'disk' => 'public',
            'path' => 'settings',
        ],
    ],
    'ckeditor' => [
        'custom_build' => [
            resource_path('assets/ckeditor/ckeditor.js'),
            resource_path('assets/ckeditor/ckeditor-init.js'),
        ],
    ],
],

'widgets' => [
    'list' => [],
    'update' => [
        [
            'type' => 'script',
            'content' => 'https://unpkg.com/[email protected]/jquery.colorbox-min.js',
        ],
        [
            'type' => 'style',
            'content' => 'https://unpkg.com/[email protected]/example2/colorbox.css',
        ],
    ],
],

'order-by' => [
    'field' => 'position',
    'order' => 'asc',
],

'entity-name-strings' => [
    'singular' => 'setting',
    'plural' => 'settings',
],

//'model' => \Eleven59\BackpackSettingsExtended\Models\Setting::class, // <-- default
'model' => \Eleven59\BackpackSettingsExtended\Models\SettingWithTranslations::class, // <-- switch to this one