1.9 2021-07-09 05:56 UTC

This package is auto-updated.

Last update: 2024-09-11 15:56:48 UTC


README

  • @webiste: http://foostart.com
  • @package-name: package-myclass
  • @author: Kang
  • @date: 12/07/2021
  • @version: 1.9

特性

  1. CRUD
  2. 将分类添加到表单
  3. 语言标准
  4. 在表格数据上添加过滤器
  5. 添加令牌以防止XSRF

步骤 1: 将服务提供者添加到 config/app.php

  1. Tranthihoaitrang\Myclass\ClassServiceProvider::class

步骤 2: 安装发布

  1. php artisan vendor:publish --provider="Tranthihoaitrang\Myclass\ClassServiceProvider" --force
  2. php artisan vendor:publish --provider="Foostart\Slideshow\SlideshowServiceProvider" --force

步骤 3: 发布包的配置和资产

  1. php artisan vendor:publish --tag=lfm_config
  2. php artisan vendor:publish --tag=lfm_public

步骤 4: 清除缓存

  1. php artisan route:clear
  2. php artisan config:clear
  3. php artisan storage:link

步骤 5: 迁移和 Seeder

运行以下命令

  1. php artisan migrate
  2. php artisan db:seed

步骤 6: 添加用户

foostart\laravel-filemanager\src\Handlers\ConfigHandler.php

<?php

namespace Foostart\Filemanager\Handlers;


class ConfigHandler
{
    public function userField()
    {
        //original
        //return auth()->user()->id;
        $auth = \App::make('authenticator');
        $user = $auth->getLoggedUser();
        if (empty($user)) {
            return NULL;
        }
        return $user->id;
    }
}

## Step 7: Set up router
[
            'name'        => 'class-admin.menus.top-menu',
            "route"       => "Myclass",
            "link"        => '/admin/Myclass',
            "permissions" => [$admin]
        ],