tranthihoaitrang / myclass
管理 Myclass
1.9
2021-07-09 05:56 UTC
Requires
README
- @webiste: http://foostart.com
- @package-name: package-myclass
- @author: Kang
- @date: 12/07/2021
- @version: 1.9
特性
- CRUD
- 将分类添加到表单
- 语言标准
- 在表格数据上添加过滤器
- 添加令牌以防止XSRF
步骤 1: 将服务提供者添加到 config/app.php
- Tranthihoaitrang\Myclass\ClassServiceProvider::class
步骤 2: 安装发布
- php artisan vendor:publish --provider="Tranthihoaitrang\Myclass\ClassServiceProvider" --force
- php artisan vendor:publish --provider="Foostart\Slideshow\SlideshowServiceProvider" --force
步骤 3: 发布包的配置和资产
- php artisan vendor:publish --tag=lfm_config
- php artisan vendor:publish --tag=lfm_public
步骤 4: 清除缓存
- php artisan route:clear
- php artisan config:clear
- php artisan storage:link
步骤 5: 迁移和 Seeder
运行以下命令
- php artisan migrate
- 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]
],