function up() Schema::create('subjects', function (Blueprint $table) { $table->string('subject_name');
$table->integer('Level_id')->unsigned()->nullable
public function department() return $this->belongsTo('GloboDeals\Department','departments_id','id');外部ids的名称为table_id。我搜索和搜索,没有任何一个解决方案是有效的,所以我想我的代码是糟糕的,如果有人可以检查出来,并给我一个想法。