2017 © Pedro Peláez
 

library laravelsidebar

this is sidebar package base on bootstrap3

image

zning/laravelsidebar

this is sidebar package base on bootstrap3

  • Wednesday, December 13, 2017
  • by lizhenning87
  • Repository
  • 1 Watchers
  • 0 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

LSideBar-For-Laravel

参考 davejamesmiller/laravel-breadcrumbs 实现的侧边栏, (*1)

Feature

  1. [x] 基础框架
  2. [x] 支持自定义的侧边栏样式

1. 安装 LSideBar

在控制台中运行此命令, (*2)


composer require zning/laravelsidebar

此命令运行后将会自动更新 composer.json 文件,并将扩展包安装在vendor/目录中, (*3)

2. 配置 LSideBar

在项目config文件夹中,找到app.php, (*4)

编辑如下对应内容, (*5)

找到providers数组,添加 Zning\LaravelSideBar\LSideBarServiceProvider::class,, (*6)

'providers' => 
[
    Zning\LaravelSideBar\LSideBarServiceProvider::class,
]

找到aliases数组,添加 'LSideBar' => \Zning\LaravelSideBar\LSideBarFacade::class,, (*7)


'aliases' => [ 'LSideBar' => \Zning\LaravelSideBar\LSideBarFacade::class, ]

3. 发布 LSideBar

在控制台中运行此命令, (*8)


php artisan vendor:publish

此命令运行后会自动在config文件夹中生成lsidebar.php配置文件, (*9)

4. 部署 LSideBar

routes文件夹中新建lsidebar.php文件,文件内容如下:, (*10)

若没有找到routes文件夹,也可以在Http文件夹中创建此文件, (*11)


LSideBar::register('goods', function ($sidebars){ $sidebars->push('商品管理', '', ['icon' => 'fa fa-table']); }); LSideBar::register('goods-list', function ($sidebars){ $sidebars->parent('goods'); $sidebars->push('商品列表', route('goods-list')); });

在后台管理页面中找到对应的侧边栏位置,部署如下代码:, (*12)


@yield('LSideBar')

在每个管理页面中,部署如下代码:, (*13)


@section('LSideBar') {!! LSideBar::render('goods-list') !!} @endsection

默认主题


bootstrap bootstrap2

注意事项


[Symfony\Component\Debug\Exception\FatalThrowableError] Class 'Zning\LaravelSideBar\LSideBarServiceProvider' not found

如果使用中遇到上面的错误,请使用composer dump-autoload -o, (*14)

The Versions

13/12 2017

dev-master

9999999-dev

this is sidebar package base on bootstrap3

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Lzning

30/11 2017

v0.1.6

0.1.6.0

this is sidebar package base on bootstrap3

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Lzning

28/11 2017

v0.1.4

0.1.4.0

this is sidebar package base on bootstrap3

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Lzning

28/11 2017

v0.1.3

0.1.3.0

this is sidebar package base on bootstrap3

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Lzning