PHP code example of quansitech / qscmf-curd-generator

1. Go to this page and download the library: Download quansitech/qscmf-curd-generator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

quansitech / qscmf-curd-generator example snippets


composer 

   >  //字段注释
   >  $table->string('title', 20)->comment('@title=合作伙伴;');
   > 
   >  //表注释(laravel migration 没有提供表的注释封装)
   >  \Illuminate\Support\Facades\DB::unprepared("ALTER TABLE `qs_partner` COMMENT = '@title=合作伙伴;'");
   > 

  > > $table->mediumInteger('cate_id')->comment('@title=伙伴分类;@type=select;@table=qs_partner_cate;@show=title;');
  > > 

  > > $table->tinyInteger('delete_status')->comment('@title=删除状态;@type=select;@list=boolStatus; 1 启用 0 禁用');
  > > 

  > > $table->tinyInteger('top')->comment('@title=置顶;@type=radio;@list=boolStatus; 1 是 0 否');
  > > 

  > > $table->string('businessCate')->comment('@title=主营业务;@type=checkbox;@list=businessCate; 1 咨询 2 研发 3 设计');
  > > 

  > $table->decimal('publish_date', 14, 4)->comment('@title=发布时间;@type=date;');
  > 

  > $table->bigIncrements('file_id')->comment('@title=附件;@type=file;');
  > 

  > $table->string('files', 100)->comment('@title=附件;@type=files;');
  > 

  > $table->bigInteger('cover')->comment('@title=封面;@type=picture;');
  > 

  > $table->string('images', 100)->comment('@title=图片集;@type=pictures;');
  > 

  > $table->text('content')->comment('@title=文章内容;@type=richText;@oss=true');
  > 

  > $table->string('summary', 500)->comment('@title=文章摘要;@type=textarea;');
  > 

  > $table->tinyInteger('status')->comment('@title=状态;@type=status;@list=status; 1 启用 0 禁用');
  > 

  > $table->string('url', 500)->comment('@title=网站地址;@type=url;');
  > 

  > $table->string('tel', 20)->comment('@title=手机号;@type=phone;');
  > 

  > $table->string('email', 50)->comment('@title=邮箱;@type=email;');
  > 

  > $table->integer('place')->comment('@title=住址;@type=district;');
  > 

  > $table->integer('price')->comment('@title=单价;@type=num;');
  > 

   > $table->string('title', 20)->comment('@title=合作伙伴;@length=1,20;');
   > 

   > $table->mediumInteger('sort')->comment('@title=排序;@save=true;');
   > 

   > $table->string('title')->comment('@title=标题;@

php artisan qscmf:curd-gen 表名

php artisan qscmf:curd-gen 表名 --mode=float

// 选项可使用简写
php artisan qscmf:curd-gen 表名 -Mfloat