thaithimytien / myclass
管理班级
dev-main
2021-07-07 03:41 UTC
Requires
This package is auto-updated.
Last update: 2024-09-07 10:41:10 UTC
README
- @webiste: http://foostart.com
- @package-name: package-filemanager
- @author: Kang
- @date: 27/12/2017
- @version: 2.0
特性
- CRUD
- 将类别添加到表单
- 语言标准
- 在表格数据上添加过滤器
- 添加令牌以防止XSRF
步骤 1: 将服务提供者添加到 config/app.php
- Foostart\Post\PostServiceProvider::class,
- Foostart\Slideshow\SlideshowServiceProvider::class,
- Foostart\Filemanager\FilemanagerServiceProvider::class,
- Intervention\Image\ImageServiceProvider::class,
步骤 2: 将类别名添加到 config/app.php
- 'Image' => Intervention\Image\Facades\Image::class,
- 'Input' => Illuminate\Support\Facades\Request::class,
步骤 3: 安装发布
- php artisan vendor:publish --provider="Foostart\Post\PostServiceProvider" --force
- php artisan vendor:publish --provider="Foostart\Slideshow\SlideshowServiceProvider" --force
步骤 4: 发布包的配置和资源
- php artisan vendor:publish --tag=lfm_config
- php artisan vendor:publish --tag=lfm_public
步骤 5: 清除缓存
- php artisan route:clear
- php artisan config:clear
- php artisan storage:link
步骤 6: 迁移和 Seeder
运行以下命令
- php artisan migrate
- php artisan db:seed
步骤 7: 添加用户
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;
}
}