takielias / tablar-crud-generator
基于 https://github.com/takielias/tablar 的 Laravel Tablar Crud Generator
2.3
2024-05-02 06:19 UTC
Requires
- konekt/html: ^6.5
- laravel/framework: ^9.0|^10.0|^11.0
README
Laravel Tablar Admin Dashboard https://github.com/takielias/tablar
灵感来源于 ibex/crud-generator
- 将创建具有 Eloquent 关系的 模型
- 将创建包含所有资源的 控制器
- 将创建 Bootstrap 5.* 的 视图
We have replaced the laravelcollective/html package with konekt/html. This update ensures compatibility with PHP 8.1+ and Laravel 10 & 11, while preserving the same functionality as the original package.
要求
Laravel >= 9.*
PHP >= 8.1
安装
1 - 安装
composer require takielias/tablar-crud-generator --dev
2- 发布默认包的配置
php artisan vendor:publish --tag=crud
使用方法
php artisan make:crud {table_name}
php artisan make:crud products
在 web.php
中添加路由
Route::resource('products', 'ProductController');
路由名称使用复数斜杠格式。
选项
- 自定义路由
php artisan make:crud {table_name} --route={route_name}
- 自定义 Crud 名称:脚手架的名称。
php artisan make:crud {table_name} --crud-name={crud_name}
# For example:
# php artisan make:crud emergencies —-crud-name=Emergencies
- 自定义语言:指定屈折变化器应使用的语言(法语、挪威语(Bokmal)、葡萄牙语、西班牙语或土耳其语)
php artisan make:crud {table_name} --lang={lang}
# For example:
# php artisan make:crud incidencies --lang=spanish
示例
联系
Taki Elias - @takiele - https://ebuz.xyz - taki.elias@gmail.com