ibex/crud-generator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ibex/crud-generator

Composer 安装命令:

composer require ibex/crud-generator

包简介

Laravel CRUD Generator

README 文档

README

Laravel Crud Generator

Packagist Licence StyleCI

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

  • Tech Stack

    image
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

Model image

Controller image

Livewire component image

API only controller

image

Tailwind CSS image

Bootstrap Listing

Tailwind Form

image

Bootstrap Form 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=crud this will create the crud.php file 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

Buy me a Coffee

ko-fi

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 ibex/crud-generator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 249.57k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 704
  • 点击次数: 32
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 700
  • Watchers: 21
  • Forks: 148
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-17