| 1 | <?php |
||
| 7 | trait OwnsModels |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * {@inheritdoc} |
||
| 11 | */ |
||
| 12 | abstract public function getForeignKey(); |
||
| 13 | |||
| 14 | |||
| 15 | /** |
||
| 16 | * {@inheritdoc} |
||
| 17 | */ |
||
| 18 | abstract public function getKey(); |
||
| 19 | |||
| 20 | |||
| 21 | /** |
||
| 22 | * Determine if this model owns the given model. |
||
| 23 | * |
||
| 24 | * @param \Illuminate\Database\Eloquent\Model $model |
||
| 25 | * @param mixed $foreignKey |
||
| 26 | * @param bool $strict |
||
| 27 | * @return bool |
||
| 28 | */ |
||
| 29 | 6 | public function owns(Model $model, $foreignKey = null, $strict = false) |
|
| 39 | |||
| 40 | |||
| 41 | /** |
||
| 42 | * Determine if this model doesn't own the given model. |
||
| 43 | * |
||
| 44 | * @param \Illuminate\Database\Eloquent\Model $model |
||
| 45 | * @param mixed $foreignKey |
||
| 46 | * @param bool $strict |
||
| 47 | * @return bool |
||
| 48 | */ |
||
| 49 | 6 | public function doesntOwn(Model $model, $foreignKey = null, $strict = false) |
|
| 53 | } |
||
| 54 |