bubblegenerator/generator

Laravel 5 CRUD 生成器,带 Bootstrap 和 Datatable - BubbleGenerator

1.0 2016-06-07 06:50 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:58:44 UTC


README

BubbleGenerator

什么是 BubbleGenerator?

BubbleGenerator 是一个在创建项目时提供帮助的系统,这是一个 Laravel CRUD 生成器,它无疑会简化我们创建 CRUD 的过程。有了 BubbleGenerator,我们不再需要手动创建 CRUD,只需选择要生成的表,不仅如此,这里还有一个新表系统,我们可以直接创建一个表。
BubbleGenerator 的界面如下所示

![BubbleGenerator](https://github.com/dhamdani666/image/blob/master/bubblegenerator.png)

创建 CRUD 后的界面

![Generate BubbleGenerator](https://github.com/dhamdani666/image/blob/master/hasil%20generate.png)

BubbleGenerator 已经支持以下功能

  • Datatable
  • 批量删除数据
  • Bootstrap
  • 实时数据重新加载
  • Laravel 5.2

BubbleGenerator 使用方法

1. 安装 BubbleGenerator

"bubblegenerator/generator": "dev-master"

![Install BubbleGenerator](https://github.com/dhamdani666/image/blob/master/install.png)

2. 在 App.php 中添加 Class Provider

BubbleGenerator\Generator\BubbleGeneratorServiceProvider::class,
Yajra\Datatables\DatatablesServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,

![Providers BubbleGenerator](https://github.com/dhamdani666/image/blob/master/providers.png)

3. 打开 CMD,然后输入以下命令

php artisan vendor:publish

4. 在 composer.json 中添加以下代码到 psr-4

"files":[
      "app/Helpers/CreateFile.php",
      "app/Helpers/CreateFileNewTable.php"
]

![Helpers BubbleGenerator](https://github.com/dhamdani666/image/blob/master/helpers.png)

5. 在 app.php 中添加以下代码到 class aliases

'CreateFile' => App\Helpers\CreateFile::class,
'CreateFileNewTable' => App\Helpers\CreateFileNewTable::class,
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,

![Aliases BubbleGenerator](https://github.com/dhamdani666/image/blob/master/aliases.png)

6. 接下来再次打开 CMD,然后输入以下命令

composer dump-autoload

7. 打开 URL 以创建 CRUD,即 /bubblegenerator

![BubbleGenerator](https://github.com/dhamdani666/image/blob/master/bubblegenerator.png)

8. 如果在创建 CRUD 时出现错误/未找到,请打开 CMD 并输入以下命令

php artisan route:cache
php artisan config:cache
php artisan view:clear

9. 愿您尝试顺利,愿这一切都对我们有益

条款和条件

为了满足项目的条款和条件,您必须已安装以下 3 个包,如果您遵循上面的教程,您无需再次安装以下包,因为这些包已经通过 BubbleGenerator 安装

1. yajra datatable

Yajra datatable ini berfungsi untuk membuat datatable server side , untuk itu anda bisa mengunjungi langsung situs nya
Yajra Datatable

2. laravel collective

Laravel collective ini berfungsi mengaktifkan html blade di laravel , untuk itu anda bisa mengunjungi langsung situs nya
Laravel Collective

3. Laravel 5.0 及以上

Untuk penggunaan bubblegenerator ini minimal laravel yang harus di gunakan adalah 5.0 ke atas , untuk laravel 4 saya rasa belum bisa tapi saya belum mencobanya 
Laravel

注意

对于使用 Ubuntu 操作系统的用户,如果在使用此包时出现问题,请尝试将项目权限更改为 777,因为 BubbleGenerator 需要创建文件夹/文件的权限。

BubbleGenerator 目前仍处于 beta 版本,还有很多需要改进或添加的功能,如关系、主键等,我将尽快添加,但不是现在,但愿我会持续更新这个生成器,因为我相信这个生成器将帮助我们创建项目。

还要感谢

  • 安拉至大
  • Laravel
  • SweetAlert
  • Yajra Datatable
  • Laravel Collective

在社交媒体上联系我

Facebook
Twitter
Instagram
Medium