liyinglin 3 years ago
parent ad9a8217dd
commit 6499a6a6a2

@ -6,6 +6,11 @@ class GateLog extends SoftDeletesModel
{
protected $guarded = ['id'];
protected $casts = [
'person_no'=>'array',
'car_no'=>'array'
];
public static function add($admin_id, $code = '', $remark = '')
{
return self::create([

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('gate_logs', function (Blueprint $table) {
$table->json('person_no')->nullable()->comment('人牌');
$table->json('car_no')->nullable()->comment('车牌');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('gate_logs', function (Blueprint $table) {
//
});
}
};
Loading…
Cancel
Save