Commit 9c84835d authored by hj's avatar hj

更新提交

parent 6c390c10
......@@ -180,4 +180,14 @@ trait Helpers
return $str;
}
public function validMobile($mobile)
{
return preg_match("/^1[3456789][0-9]{9}$/", $mobile);
}
public function validEmail($email)
{
return preg_match("/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/", $email);
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCustomerMsdsServiceTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('customer_msds_service', function (Blueprint $table) {
$table->id();
$table->string('cn_company_name')->nullable()->comment('中文公司名称');
$table->string('cn_company_address')->nullable()->comment('中文公司地址');
$table->string('cn_company_phone')->nullable()->comment('中文联系电话');
$table->string('cn_company_fax')->nullable()->comment('中文公司传真');
$table->text('cn_company_logo')->nullable()->comment('中文公司logo');
$table->string('en_company_name')->nullable()->comment('英文公司名称');
$table->string('en_company_address')->nullable()->comment('英文公司地址');
$table->string('en_company_phone')->nullable()->comment('英文联系电话');
$table->string('en_company_fax')->nullable()->comment('英文公司传真');
$table->text('en_company_logo')->nullable()->comment('英文公司logo');
$table->string('token')->nullable()->comment('用户token');
$table->text('service_params')->comment('服务参数');
$table->unsignedTinyInteger('status')->nullable()->comment('服务状态');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('customer_msds_service');
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment