proshore / site-setting
从后端门户管理应用站点设置
v0.1.2
2017-12-13 08:07 UTC
Requires
- laravelcollective/html: ^5.4.0
This package is auto-updated.
Last update: 2024-09-06 05:56:31 UTC
README
基于Laravel和Bootstrap的站点设置
此包将在您的后端创建一个站点设置模块。站点设置可以用来在数据库中动态存储数据,并可用于前端。此包专为构建站点设置而准备,可能存在一些未知的问题。如果您发现任何问题,请报告。
安装
- 使用Composer安装此包。
composer require proshore/site-setting
Laravel 5.5使用包自动发现,因此您无需手动将包添加到ServiceProvider。
如果您不使用自动发现,请将ServiceProvider添加到config/app.php中的providers数组。
Proshore\SiteSetting\SiteSettingServiceProvider::class,
-
发布配置文件。
-
运行迁移。
php artisan migrate
发布
发布配置文件
php artisan vendor:publish --tag=config
发布视图
如果您想覆盖视图,请运行以下命令并做出必要的更改
php artisan vendor:publish --tag=views
文档
要更改布局路径,请选择您后端的默认布局
'layout-extend-path' => 'layouts.layout'
要添加站点设置选项,请更改位于'config/proshore-site-setting.php'的配置文件。最初有一些模板可以帮助您开始。
'fields' => [ [ 'name' => 'textfield', 'label' => 'TextField', 'type' => 'text' ], [ 'name' => 'textarea', 'label' => 'TextArea', 'type' => 'textarea', ], [ 'name' => 'select', 'label' => 'Select', 'type' => 'select', 'options' => [ '0' => 'Active', '1' => 'Inactive' ] ], [ 'name' => 'checkbox', 'label' => 'Checkbox', 'type' => 'checkbox' ], [ 'name' => 'radio', 'label' => 'Radio', 'type' => 'radio', 'options' => [ '0' => 'Active', '1' => 'Inactive' ] ], ]
贡献者
Babish Shrestha, Angel Maharjan