src/Abstractor/Eloquent/Relation/MiniCrudPolymorphic.php 1 location
|
@@ 13-27 (lines=15) @@
|
| 10 |
|
'Illuminate\Database\Eloquent\Relations\MorphMany' |
| 11 |
|
); |
| 12 |
|
|
| 13 |
|
protected function skipField($columnName, $key) |
| 14 |
|
{ |
| 15 |
|
if ($columnName === $this->eloquentRelation->getPlainForeignKey()) { |
| 16 |
|
return true; |
| 17 |
|
} |
| 18 |
|
|
| 19 |
|
if ($columnName === $this->eloquentRelation->getPlainMorphType()) { |
| 20 |
|
return true; |
| 21 |
|
} |
| 22 |
|
|
| 23 |
|
if ($key === 'emptyResult' && ($columnName === $this->eloquentRelation->getParent()->getKeyName())) { |
| 24 |
|
return true; |
| 25 |
|
} |
| 26 |
|
return false; |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
protected function setKeys(Model $relationModel) |
| 30 |
|
{ |
src/Abstractor/Eloquent/Relation/MiniCrud.php 1 location
|
@@ 179-190 (lines=12) @@
|
| 176 |
|
$relationModel->setAttribute($this->eloquentRelation->getForeignKey(), $this->relatedModel->id); |
| 177 |
|
} |
| 178 |
|
|
| 179 |
|
protected function skipField($columnName, $key) |
| 180 |
|
{ |
| 181 |
|
if ($columnName === $this->eloquentRelation->getPlainForeignKey()) { |
| 182 |
|
return true; |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
if ($key === 'emptyResult' && ($columnName === $this->eloquentRelation->getParent()->getKeyName())) { |
| 186 |
|
return true; |
| 187 |
|
} |
| 188 |
|
|
| 189 |
|
return false; |
| 190 |
|
} |
| 191 |
|
|
| 192 |
|
/** |
| 193 |
|
* @return string |