添加是否新窗口打开
parent
26388d010c
commit
5d4610f818
|
|
@ -34,6 +34,8 @@ class AgriculturalBaseResource extends JsonResource
|
|||
'total_output' => $this->whenLoaded('yieldLogs', function () {
|
||||
return $this->yield_logs_sum_output ?? 0;
|
||||
}, 0),
|
||||
'industry_key'=>$this->industry_key,
|
||||
'is_blank'=>$this->is_blank ?? 0,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class AgriculturalBase extends Model
|
|||
'parent_id', 'cultivated',
|
||||
'sort',
|
||||
'extends',
|
||||
'industry_key',
|
||||
'industry_key','is_blank'
|
||||
];
|
||||
|
||||
public function parent(){
|
||||
|
|
|
|||
|
|
@ -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('agricultural_bases', function (Blueprint $table) {
|
||||
//
|
||||
$table->unsignedInteger('is_blank')->default(0)->comment('是否新窗口打开');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('agricultural_bases', function (Blueprint $table) {
|
||||
//
|
||||
$table->dropColumn('is_blank');
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue