viralsoft / bptheme-stoke
为背包设计的主题 stoke
1.1.1
2021-03-17 10:42 UTC
This package is not auto-updated.
Last update: 2024-09-26 03:24:24 UTC
README
#Backpack Theme Stoke 将背包主题改为 stoke (https://themesbrand.com/skote/layouts/ui-notifications.html) ##通过 Composer 安装
$ composer require viralsoft/bptheme-stoke
用法
可选,您可以发布配置以提供不同的服务提供者占位符。默认配置如下。
$ php artisan vendor:publish --provider="ViralSoft\BPThemeStoke\StokeServiceProvider"
您可以通过扩展 BaseCrudController 来编辑您的 CRUD 控制器,如下所示
useViralSoft\BPThemeStoke\app\Http\Controllers\BaseCrudController; class CategoryCrudController extends BaseCrudController
在函数 setup 中,您需要添加
public function setup() { parent::setup(); CRUD::setModel(\App\Models\Category::class); CRUD::setRoute(config('backpack.base.route_prefix') . '/category'); CRUD::setEntityNameStrings('category', 'categories'); }
在 config/backpack/base.php 中,您需要编辑 'view_namespace' => 'stoke-horizontal::' 或 'view_namespace' => 'stoke-vertical::' 以成功使用主题,并重新加载页面以及主题设置