定制 laravortex/crud-generator 二次开发

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

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

laravortex/crud-generator

最新稳定版本:v1.0.0

Composer 安装命令:

composer require laravortex/crud-generator

包简介

CRUD Generator for Laravel (Dev Only)

README 文档

README

Laravel PHP License

🚀 Turbo CRUD Generator for Laravel
Generate Model, Controller, View, Route, Layout, dan Sidebar Navigation otomatis hanya dengan satu perintah.

Dirancang untuk cepat, aman dijalankan berulang, dan mudah dikustomisasi.

✨ Features

  • One-command CRUD generator (buat:all)
  • Auto-generate:
    • Model (+ casts)
    • Controller (CRUD + search)
    • Views (index, form)
    • Routes (Route::resource)
  • Auto-detect database relationships:
    • belongsTo
    • hasMany
  • Layout & Sidebar system
  • Sidebar menu auto-injection (marker-based)
  • Anti-duplicate menu
  • Batch processing (Turbo Mode)
  • Configurable & customizable stubs
  • Laravel 10 / 11 / 12 support

📋 Requirements

  • PHP >= 8.1
  • Laravel 10.x / 11.x / 12.x
  • Database migration sudah dijalankan

📦 Installation (Development Only)

LaraVortex adalah CRUD Generator yang ditujukan untuk development phase
dan tidak disarankan digunakan sebagai dependency production.

Install sebagai dev dependency:

composer require laravortex/crud-generator --dev

Laravel auto-discovery aktif, tidak perlu register manual.

💡 Why dev-only?
LaraVortex hanya digunakan saat proses development untuk menghasilkan kode CRUD. Setelah file CRUD dibuat, aplikasi tidak lagi bergantung pada package ini.

🚀 Quick Start

Generate semua tabel + layout

php artisan buat:all

Generate tabel tertentu

php artisan buat:all products,categories,reviews

Generate layout + sidebar (pertama kali)

php artisan buat:all --layout

🧭 Sidebar Navigation System

LaraVortex menggunakan marker-based injection.

Pastikan sidebar memiliki marker berikut:

{{-- vortex:menu --}}

📁 Lokasi default:

resources/views/layouts/partials/sidebar.blade.php

Menu akan otomatis:

  • ditambahkan setelah marker
  • tidak diduplikasi
  • tidak merusak layout

⚙️ Configuration

Publish config:

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

File:

config/vortex.php

Default Config

return [
    // Folder tujuan output (namespace)
    "namespaces" => [
        "models" => "App\\Models",
        "controllers" => "App\\Http\\Controllers",
    ],

    // DAFTAR TABEL YANG DI-SKIP (BLACKLIST)

    "ignore_tables" => [
        "migrations",
        "users",
        "password_reset_tokens",
        "password_resets", 
        "personal_access_tokens", 
        "jobs",
        "failed_jobs",
        "job_batches", 
        "sessions",
        "cache",
        "cache_locks",

        "telescope_entries",
        "telescope_entries_tags",
        "telescope_monitoring",
        "notifications",
    ],

    "layout" => "layouts.app",
    "section" => "content",
];

🛠 Customization Guide

1 Custom Layout Name

'layout' => 'layouts.admin',

Generator akan memakai:

resources/views/layouts/admin.blade.php

2 Custom Namespace Model / Controller

'namespaces' => [
    'models' => 'Domain\\Catalog\\Models',
    'controllers' => 'App\\Http\\Controllers\\Admin',
],

3 Ignore Table Tertentu

'ignore_tables' => [
    'logs',
    'audit_trails',
],

🎨 Custom Stub (Advanced)

Publish stub:

php artisan vendor:publish --tag=laravortex-stubs

Struktur:

stubs/laravortex/
├── model.stub
├── controller.stub
└── views/
    ├── layout.blade.stub
    ├── index.blade.stub
    ├── form.blade.stub
    └── partials/
        └── sidebar.blade.stub

➡️ Jika stub ada di sini, akan otomatis dipakai ➡️ Tidak perlu fork package

🧪 Safe Re-run

  • Menu tidak duplikat
  • Layout tidak ditimpa tanpa --layout
  • Sidebar aman
  • Bisa dijalankan berkali-kali

📦 Version

v1.0.0 – Initial Stable Release

📄 License

MIT License © 2026 – LaraVortex

MIT License

Copyright (c) 2026 Ruxla

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固