@@ -35,6 +35,13 @@ |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | //TODO: should be place in parent so it can also be used there |
| 38 | + |
|
| 39 | + /** |
|
| 40 | + * @param string $stub |
|
| 41 | + * @param string $keys |
|
| 42 | + * @param string $type |
|
| 43 | + * @param string $pivotModelName |
|
| 44 | + */ |
|
| 38 | 45 | private function createRelation($stub, $source, $target, $keys, $methodName, $type, $pivotModelName = null) |
| 39 | 46 | { |
| 40 | 47 | $file = (new ReflectionClass($source))->getFileName(); |
@@ -11,6 +11,7 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * Find pivot model class for BelongsToMany |
| 13 | 13 | * |
| 14 | + * @param \ReflectionMethod $method |
|
| 14 | 15 | * @return object|null Returns instance of pivot model when found, null on failure |
| 15 | 16 | */ |
| 16 | 17 | public static function getPivotModel($method) |
@@ -33,6 +34,8 @@ discard block |
||
| 33 | 34 | /** |
| 34 | 35 | * Makes an attemp at finding pivot model class for BelongsToMany without @schematics-pivot tag |
| 35 | 36 | * |
| 37 | + * @param \Illuminate\Database\Eloquent\Relations\Relation $invocation |
|
| 38 | + * @param \ReflectionMethod $method |
|
| 36 | 39 | * @return object|null Returns instance of pivot model when found, null on failure |
| 37 | 40 | */ |
| 38 | 41 | public static function getPivotModelFallback($srcModel, $invocation, $method, $models) |