laravortex/crud-generator

CRUD Generator for Laravel (Dev Only)

Maintainers

Package info

github.com/ruxla-but/laravortex-crud-generator

pkg:composer/laravortex/crud-generator

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-01-25 19:48 UTC

This package is auto-updated.

Last update: 2026-03-27 10:41:34 UTC


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.