aminpciu / crudautomation
Laravel crud自动化是一个可以最小化crud操作开发时间的包
1.0.2
2023-05-10 12:59 UTC
Requires
- php: >=7.4
- guzzlehttp/guzzle: ^7.0.1
This package is not auto-updated.
Last update: 2024-09-25 19:35:29 UTC
README
Laravel crud-automation是一个可以最小化crud操作开发时间的包
安装
composer require aminpciu/crudautomation
将此提供者注册到laravel项目中,前往配置文件夹下的app.php文件,然后向提供者数组中添加此行
Aminpciu\CrudAutomation\app\Providers\DynamicCrudProvider::class
example:
'providers' => [
Aminpciu\CrudAutomation\app\Providers\DynamicCrudProvider::class
]
运行laravel项目的命令
php artisan vendor:publish --tag=public --force
php artisan vendor:publish --tag=config
运行两个命令
composer dump-autoload
php artisan migrate
加载GUI界面
APP URL/crud-auto/index
example:
https://:8000/crud-auto/index
用于安全路由
add middleware name to dynamic_crud_auto_configs table
用于自定义主控
update (master_blade) column value by your master blade name from dynamic_crud_auto_configs table
or empty dynamic_crud_auto_configs table then reload and add middleware name and save
example:
master blade name means like
@extends('admin.layout.master')
add two lines in <head>
@include('lca-amin-pciu::layouts.header_script')
@yield('custom_style_amin_pciu')
example:
<head>
...
@include('lca-amin-pciu::layouts.header_script')
@yield('custom_style_amin_pciu')
</head>
add these lines
@include('lca-amin-pciu::layouts.navbar')
@yield('content_page_amin_pciu')
@include('lca-amin-pciu::layouts.footer_script')
@yield('custom_script_amin_pciu_before_amin_pciu')
@yield('custom_script_amin_pciu')
example:
<body>
...
<div class="container">
@include('lca-amin-pciu::layouts.navbar')
@yield('content_page_amin_pciu')
</div>
@include('lca-amin-pciu::layouts.footer_script')
@yield('custom_script_amin_pciu_before_amin_pciu')
@yield('custom_script_amin_pciu')
</body>
用于重置所有数据
empty these three table data
dynamic_crud_auto_configs,dynamic_crud_form_details,dynamic_crud_settings