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 |
|
|
| 27 |
|
return false; |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
protected function setKeys(Model $relationModel) |
src/Abstractor/Eloquent/Relation/MiniCrud.php 1 location
|
@@ 282-293 (lines=12) @@
|
| 279 |
|
$relationModel->setAttribute($this->eloquentRelation->getForeignKey(), $this->relatedModel->id); |
| 280 |
|
} |
| 281 |
|
|
| 282 |
|
protected function skipField($columnName, $key) |
| 283 |
|
{ |
| 284 |
|
if ($columnName === $this->eloquentRelation->getPlainForeignKey()) { |
| 285 |
|
return true; |
| 286 |
|
} |
| 287 |
|
|
| 288 |
|
if ($key === 'emptyResult' && ($columnName === $this->eloquentRelation->getParent()->getKeyName())) { |
| 289 |
|
return true; |
| 290 |
|
} |
| 291 |
|
|
| 292 |
|
return false; |
| 293 |
|
} |
| 294 |
|
|
| 295 |
|
/** |
| 296 |
|
* @return string |