code: public function onlyFillablePivot($pivotRelation, $data)
      {
          $fillable = $this->getPivotFields($pivotRelation, 'pivotColumns');
          
          return array_only($data, $fillable);
      }
docs: Get only fields fillable from Pivot Relation
  
  @return array