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

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

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

grazulex/laravel-autobuilder

最新稳定版本:v1.0.7

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 10.x, 11.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:

统计信息

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

GitHub 信息

  • Stars: 40
  • Watchers: 4
  • Forks: 3
  • 开发语言: PHP

其他信息

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