芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/portpulselogistics.com/Modules/Widget/Sidebar.md
## Register new sidebar Run function `register_sidebar` in `ServiceProvider` whether in module or root app - in app = `app/Providers/AppServiceProvider @register` - in module = `Modules/{module}/{module}ServiceProvider @register` Register example: ```php public function register() { register_sidebar([ 'id' => 'sidebar_id', 'name' => 'sidebar name', 'theme' => 'html', 'description' => 'sidebar description', 'before_sidebar' => '', 'before_widget' => '
', 'after_widget' => '
' ]); } ``` ## Unregister sidebar Run function `unregister_sidebar` in `ServiceProvider` whether in module or root app - in app = `app/Providers/AppServiceProvider @boot` - in module = `Modules/{module}/{module}ServiceProvider @boot` Unregister example: ```php public function boot() { unregister_sidebar('sidebar_id'); } ```