thereline/crudmaster
Composer 安装命令:
composer require thereline/crudmaster
包简介
A Laravel package called CrudMaster that provides modular, flexible CRUD generation and response handling, tailored for both API and web (Inertia or Blade) apps.
README 文档
README
CrudMaster by Elcomware is a premium Laravel package that helps you scaffold professional, scalable, and modern CRUD systems in minutes. It supports full-stack development — from clean API endpoints to dynamic frontend-ready scaffolding for Inertia.js or Blade-based apps.
🚀 Features
- ⚙️ Instant CRUD generation (Model, Migration, Controller, Request, Policy, Routes)
- 🎨 Supports Blade or Inertia (Vue) UI stacks
- 🧩 JSON API-ready controllers with clean unified response
- 🧱 Custom stub system for flexible scaffolding
- 📂 Auto-register routes, views, and assets
- ✅ Unified response helpers (Success, Error, Validation)
- 🧪 Built-in test support & publishable config/assets
- 📦 Laravel 10+ and 12+ ready
📦 Installation
composer require elcomware/crudmaster
🔧 If using Laravel < 5.5, manually register the service provider:
// config/app.php 'providers' => [ CrudMaster\CrudMasterServiceProvider::class, ],
📂 Publish Assets
php artisan vendor:publish --tag=crudmaster-config # Configuration file php artisan vendor:publish --tag=crudmaster-views # Blade views php artisan vendor:publish --tag=crudmaster-stubs # Customizable stubs php artisan vendor:publish --tag=crudmaster-js # Inertia-compatible JS
⚡ Quick Start
Generate CRUD for a resource (e.g. Post):
php artisan crudmaster:make Post
Options:
| Option | Description |
|---|---|
--inertia |
Generate Inertia + Vue scaffolding |
--api |
API-only controller |
--ui=blade |
Choose blade, inertia, or none |
--fields=name:string,email:string,age:integer |
Scaffold with fields |
--force |
Overwrite existing files |
🔄 Response System
CrudMaster includes an intelligent response engine:
respond_success($payload, 'Component', ['extra'], 'Done', 'route.name'); respond_error('Something failed', 'redirect.back', ['details']); respond_info('FYI message...'); respond_validation_failure($errors);
🧠 Automatically detects:
- API (returns JSON)
- Inertia (returns Inertia::render)
- Blade (returns view or redirect)
⚙️ Config (config/crudmaster.php)
return [ 'ui' => 'inertia', 'default_namespace' => 'App\\Http\\Controllers', 'response_class' => App\\Http\\Responses\\SuccessResponse::class, 'routes' => [ 'prefix' => 'admin', 'middleware' => ['web', 'auth'], ], ];
🧪 Testing
CrudMaster is ready for automated testing via Pest or PHPUnit.
php artisan test
📁 Folder Structure Overview
src/
├── Commands/
├── Generators/
├── Responses/
├── Stubs/
├── Helpers/
├── CrudMasterServiceProvider.php
📖 License
CrudMaster is open-source software licensed under the MIT license.
💬 Support & Contributions
Need help? Found a bug? Want to contribute?
- Submit issues or PRs via GitHub
- Commercial/custom feature support: hello@elcomware.com
Your CRUD. Your Stack. Your Control — with CrudMaster by Elcomware.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-24