ibex/crud-generator
Composer 安装命令:
composer require ibex/crud-generator
包简介
Laravel CRUD Generator
关键字:
README 文档
README
This Laravel CRUD Generator v2.x package provides and generates Controller, Model (with eloquent relations), and Views in Bootstrap/Tailwind CSS for the development of your applications with a single command. This new v2.x will have stack options like bootstrap, tailwind, livewire(Livewire views will be generated in Tailwind CSS), and API only.
- Will create Model with Eloquent relations
- Will create Controller with all resources
- Will create API Controllers with all requests
- Will create Component with all resources for Livewire
- Will create views in Bootstrap/Tailwind
This is the best crud generator for a blank Laravel project installation too. This will auto install the starter kit laravel/breeze or laravel/ui (for bootstrap 5) for blank Laravel installation.
Requirements
Laravel >= 10.x
PHP >= 8.1
Installation
1 - Install
composer require ibex/crud-generator --dev
2- Publish the default package's config (optional)
php artisan vendor:publish --tag=crud
For older Laravel(<10.x) versions please use v1.x
composer require ibex/crud-generator:1.6 --dev
Usage
php artisan make:crud {table_name}
php artisan make:crud banks
Add a route in web.php
Route::resource('banks', BankController::class);
For Livewire add routes below
Route::get('/banks', \App\Livewire\Banks\Index::class)->name('banks.index');
Route::get('/banks/create', \App\Livewire\Banks\Create::class)->name('banks.create');
Route::get('/banks/show/{bank}', \App\Livewire\Banks\Show::class)->name('banks.show');
Route::get('/banks/update/{bank}', \App\Livewire\Banks\Edit::class)->name('banks.edit');
For api add routes below
Route::apiResource('banks', BankController::class);
Route name in plural slug case.
Options
php artisan make:crud {table_name} {bootstrap,tailwind,livewire,api}
php artisan make:crud banks bootstrap //This will create views in Bootstrap 5 using Blade
php artisan make:crud banks tailwind //This will create views in Tailwind css using Blade
php artisan make:crud banks livewire //This will create views in Tailwind css with Livewire components
php artisan make:crud banks api //This will create API only controllers
- Custom Route
php artisan make:crud {table_name} --route={route_name}
Examples
API only controller
Tailwind Form
Personalize
You have the possibility of 100% customizing the generated views, this is achieved in the following way:
- Run this command
php artisan vendor:publish --tag=crudthis will create thecrud.phpfile in your config/ folder. - Update the variable
stub_path, to your own stub folder like'stub_path' => resource_path('stubs/'), - Copy the stubs files from package
php artisan vendor:publish --tag=stubs-crud
- Update your changes in your stub files. (you can delete extra files/folders if you are not using them).
- Run the command for crud generation and you'll get the updated views.
Author
M Awais // Email Me
Hire Me LinkedIn
ibex/crud-generator 适用场景与选型建议
ibex/crud-generator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 249.57k 次下载、GitHub Stars 达 700, 最近一次更新时间为 2018 年 12 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「crud」 「laravel」 「crud generator」 「laravel package」 「laravel crud generator」 「tailwind css」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ibex/crud-generator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ibex/crud-generator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ibex/crud-generator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
Gii Generator for double model generation
A PSR-7 compatible library for making CRUD API endpoints
Admin panel generator for Laravel 8 and based on Vuetify Admin, a separate SPA admin framework running on top of REST APIs.
Collection of tools to use the full power of the Enyalius framework
Laravel Admin CRUD Generator
统计信息
- 总下载量: 249.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 704
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-17