承接 feldoe/laravel-export-progress 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

feldoe/laravel-export-progress

最新稳定版本:v1.2.0

Composer 安装命令:

composer require feldoe/laravel-export-progress

包简介

Add progress broadcast events to your exports

README 文档

README

About Laravel export progress

Example

final class UsersExport extends AbstractExport implements FromQuery
{
    /**
     * @param User $user
     */
    public function map($user): array
    {
        try {
            $this->sendProgressEventIfNeeded();
        } catch (Exception $exception) {
            Log::error(__('Failed to send progress event => :message', ['message' => $exception->getMessage()]));
        }

        return [
            $user->id,
            $user->username,
            $user->email,
        ];
    }

    public function query(): Builder
    {
        return User::query();
    }
}
const startExport = (data) => {
    exportSystem.start(data.uuid, data.name)
}

Echo.private(`exports.${this.user.id}`)
.listen('.export.progressed', e => {
    exportSystem.progress(
        e.uuid,
        e.type,
        e.model?.name,
        e.progress,
        e.estimated_duration
    )
})
.listen('.export.completed', e => {
    exportStore.finish(payload.uuid)

    notify({
    title: tr(`success.${payload.type}`),
    type: 'valid'
    })
    
    window.open(payload.url)
})
.listen('.export.failed', e => {
    exportSystem.fail(
        e.uuid,
        e.reason.message
    )
})

License

Laravel export progress is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 689
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固