PHP code example of visual-ideas / laravel-seoable
1. Go to this page and download the library: Download visual-ideas/laravel-seoable 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/ */
visual-ideas / laravel-seoable example snippets
return [
'cache_key' => env('LSS_CACHE_KEY','laravel_site_settings_data'),
];
function settings($key = null, $default = null)
{
if (is_null($key)) {
return app('Settings')->all();
}
if (is_array($key)) {
return app('Settings')->set($key);
}
return app('Settings')->get($key, $default);
}
@settings('group.setting')
@config('settings.group.setting')
settings(['group.setting' => 'Value']);
settings(['setting' => 'Value']);
MenuGroup::make('Settings', [
MenuItem::make('Settings', SettingResource::class)->icon('app'),
MenuItem::make('Settings groups', SettingGroupResource::class)->icon('app'),
])->icon('app'),
settings([
['group.setting1' => 'Value1'],
['group.setting2' => 'Value2'],
['group.setting3' => 'Value3'],
['setting1' => 'Value4'],
['setting2' => 'Value5'],
['setting3' => 'Value6'],
['setting4' => 'Value7'],
['setting5' => 'Value8']
]);
bash
php artisan migrate
bash
php artisan vendor:publish --provider="VI\LaravelSeoable\LaravelSeoableProvider" --tag="config"
bash
php artisan vendor:publish --provider="VI\LaravelSeoable\LaravelSeoableProvider" --tag="moonshine"
bash
php artisan iseed setting_groups,settings