laravortex / crud-generator
CRUD Generator for Laravel (Dev Only)
Requires
- php: ^8.1
- doctrine/dbal: ^3.0|^4.0
- illuminate/console: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
This package is auto-updated.
Last update: 2026-03-27 10:41:34 UTC
README
๐ 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:
belongsTohasMany
- 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.