2017 © Pedro Peláez
 

library menu

image

keling/menu

  • Friday, April 13, 2018
  • by qq2504021719
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 75 % Grown

The README.md

文件迁移

php artisan vendor:publish --provider="Keling\Menu\MenuServiceProvider"

数据库迁移

php artisan migrate

更新composer

composer dump-autoload

数据添加

php artisan db:seed --class=MenusTableSeeder

使用方法

use Keling\Menu\Repositories\MenuRepository;

class TestController extends Controller
{
    public $menuRepository;

    public function __construct(MenuRepository $menuRepository)
    {
        $this->menuRepository = $menuRepository;
    }

    public function test(){
        // 显示全部 参数一 $kile 参数二  $is 1 返回一维菜单 其余返回递归菜单
        $data = $this->menuRepository->all();
//         添加
//        $data = $this->menuRepository->create('菜单', '1', '1');
//        查询
//        $data = $this->menuRepository->show(1);
//        删除
//        $data = $this->menuRepository->destroy(1);
//        修改
//        $data = $this->menuRepository->store(['id' => 1], ['name' => '修改']);
        dd($data);
    }
}

配置

'Redis' => true // true 开始redis缓存  false 开启

The Versions

13/04 2018

dev-master

9999999-dev

  Sources   Download

The Requires

 

by 潘亮mac

13/04 2018

1.0.2

1.0.2.0

  Sources   Download

The Requires

 

by 潘亮mac

13/04 2018

1.0.1

1.0.1.0

  Sources   Download

The Requires

 

by 潘亮mac