grazulex/laravel-autobuilder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

grazulex/laravel-autobuilder

Composer 安装命令:

composer require grazulex/laravel-autobuilder

包简介

A visual automation builder for Laravel applications - Build workflows like Node-RED, directly in your Laravel app

README 文档

README

Visual automation builder for Laravel - Create workflows with a drag-and-drop interface

Latest Version on Packagist Total Downloads License

Looking for Testers & Feedback!

This is the first public release of Laravel AutoBuilder. I'm actively looking for testers and feedback from the Laravel community to help improve this package.

  • Try it out and share your experience
  • Report bugs via GitHub Issues
  • Suggest features or improvements
  • Share your flows and use cases

Your feedback is invaluable! Let's build something great together.

What is Laravel AutoBuilder?

Laravel AutoBuilder is a visual automation builder inspired by Node-RED, n8n, and Zapier. It allows you to create complex automations using a drag-and-drop interface directly in your Laravel application.

Build workflows that react to events, make decisions, and execute actions - all without writing code.

Key Features

  • Visual Flow Editor - Intuitive drag-and-drop interface built with Vue Flow
  • Trigger-based Automation - React to model events, webhooks, schedules, and more
  • Conditional Logic - Branch flows based on field values, user roles, or custom conditions
  • Rich Action Library - Send notifications, create models, call APIs, transform data
  • Logic Gates - AND, OR, AtLeast gates for complex decision making
  • Flow Validation - Check for configuration errors before activation
  • Execution History - Debug with detailed logs and variable inspection
  • Import/Export - Share flows between projects as JSON files
  • Sync/Async Execution - Choose immediate or queued execution per flow

Requirements

Requirement Version
PHP 8.2+
Laravel 11.x, 12.x
Node.js 18+ (for development)

Installation

composer require grazulex/laravel-autobuilder

Publish assets and run migrations:

php artisan vendor:publish --tag=autobuilder-assets
php artisan vendor:publish --tag=autobuilder-migrations
php artisan migrate

Access the visual editor at /autobuilder.

Quick Example

Create a flow that sends a notification when a user is created:

  1. Add a "On Model Created" trigger for the User model
  2. Connect it to a "Send Notification" action
  3. Configure the notification with {{ user.email }} and {{ user.name }}
  4. Activate the flow

That's it! The automation will run whenever a new user is created.

Documentation

For complete documentation, visit the Wiki:

Built-in Bricks

Triggers

  • OnModelCreated - Fire when an Eloquent model is created
  • OnModelUpdated - Fire when a model is updated
  • OnModelDeleted - Fire when a model is deleted
  • OnWebhook - Receive external webhook calls
  • OnSchedule - Run on a cron schedule
  • OnLogin / OnLogout - React to authentication events

Conditions

  • FieldEquals - Check if a field matches a value
  • FieldContains - Check if a field contains a value
  • UserHasRole - Check user roles (Spatie compatible)
  • TimeIsBetween - Check if current time is in a range
  • SwitchCase - Multi-case comparison
  • Throttle - Rate limiting condition
  • RandomChance - A/B testing with configurable percentage

Actions

  • SendNotification - Send Laravel notifications
  • CreateModel - Create Eloquent models
  • UpdateModel - Update existing models
  • DeleteModel - Delete models
  • CallWebhook - Make HTTP requests to external APIs
  • SetVariable - Store values for use in the flow
  • LogMessage - Write to Laravel logs
  • TransformData - Collection transformations (pluck, filter, sort, etc.)
  • CacheAction - Cache operations (get, put, forget)
  • SubFlow - Execute another flow as a subroutine
  • Delay - Pause execution
  • LoopEach - Iterate over collections

Gates

  • AndGate - All inputs must be true
  • OrGate - At least one input must be true
  • AtLeastGate - Flexible: min count, percentage, majority, or all/any

Variable Templating

Use Blade-like syntax to reference data in your flows:

{{ user.name }}          - Access nested values
{{ amount | upper }}     - Apply filters
{{ items | count }}      - Get collection count

Available filters: upper, lower, ucfirst, json, date, datetime, count

Configuration

Publish the configuration file:

php artisan vendor:publish --tag=autobuilder-config

Key options in config/autobuilder.php:

return [
    'routes' => [
        'prefix' => 'autobuilder',
        'middleware' => ['web', 'auth'],
    ],
    'bricks' => [
        'paths' => [app_path('AutoBuilder/Bricks')],
        'namespace' => 'App\\AutoBuilder\\Bricks',
    ],
];

Creating Custom Bricks

Create your own triggers, conditions, and actions:

namespace App\AutoBuilder\Bricks;

use Grazulex\AutoBuilder\Bricks\Action;
use Grazulex\AutoBuilder\Flow\FlowContext;

class SendSlackMessage extends Action
{
    public function name(): string
    {
        return 'Send Slack Message';
    }

    public function fields(): array
    {
        return [
            Text::make('channel')->label('Channel')->required(),
            Textarea::make('message')->label('Message')->supportsVariables(),
        ];
    }

    public function handle(FlowContext $context): FlowContext
    {
        // Your logic here
        return $context;
    }
}

Security

  • Webhook endpoints validate signatures via X-Webhook-Secret header
  • Custom code execution can be disabled in config
  • Authorization gate: access-autobuilder

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

Author

Created by Jean-Marc Strauven (@Grazulex)

About the Author

Creator of 17+ Laravel packages with 6,000+ downloads, including:

Need help with your Laravel project? I offer consulting services:

  • Custom package development
  • Code audits and optimization
  • Architecture consulting

Contact: GitHub

Contributors

Thanks to these wonderful people for their contributions:

grazulex/laravel-autobuilder 适用场景与选型建议

grazulex/laravel-autobuilder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 283 次下载、GitHub Stars 达 46, 最近一次更新时间为 2025 年 12 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「workflow」 「laravel」 「automation」 「zapier」 「n8n」 「visual-builder」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 grazulex/laravel-autobuilder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 grazulex/laravel-autobuilder 我们能提供哪些服务?
定制开发 / 二次开发

基于 grazulex/laravel-autobuilder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 46
  • Watchers: 5
  • Forks: 4
  • 开发语言: PHP

其他信息

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