定制 zojaji/laravel-workflow 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

zojaji/laravel-workflow

最新稳定版本:v0.2.0

Composer 安装命令:

composer require zojaji/laravel-workflow

包简介

General-purpose workflow engine for Laravel with Spatie integration.

README 文档

README

General-purpose workflow engine for Laravel, with default integration to Spatie's laravel-permission.

Full developer documentation: docs/guide.en.md Examples: docs/examples.en.md Persian documentation: docs/guide.fa.md, docs/examples.fa.md

Installation

  • Require the package:
    • composer require zojaji/laravel-workflow
  • Publish configs, migrations, and views:
    • php artisan vendor:publish --tag=workflow-config
    • php artisan vendor:publish --tag=workflow-migrations
    • php artisan vendor:publish --tag=workflow-views
  • Run migrations:
    • php artisan migrate

Dependencies

  • spatie/laravel-permission as a primary dependency
    • Add the Spatie\Permission\Traits\HasRoles trait to your User model

Model Configuration

  • In config/workflow.php:
    • workflow.models.role: Role model class (default: Spatie\Permission\Models\Role)
    • workflow.models.user: User model class (default: config('auth.providers.users.model'))

Quick Usage

  • Create a task with decision & assignment:
    • \Zojaji\Workflow\Facades\Workflow::completeAndRoute($taskId, $userId, $context)
  • Finalize user selection for the role_direct_user method:
    • \Zojaji\Workflow\Facades\Workflow::finalizeSelection($instanceId, $stateId, $taskName, $userId, $roleId, $decisionOptions)

Routes

  • API is loaded under api/workflow/* and admin pages under admin/workflows/*.

License

  • MIT

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-02