| Total Complexity | 0 |
| Total Lines | 69 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | trait Model |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Register observers with the model. |
||
| 15 | * |
||
| 16 | * @param object|array|string $classes |
||
| 17 | * @return void |
||
| 18 | */ |
||
| 19 | abstract public static function observe($classes); |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Get the value of the model's primary key. |
||
| 23 | * |
||
| 24 | * @return mixed |
||
| 25 | */ |
||
| 26 | abstract public function getKey(); |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Begin querying the model. |
||
| 30 | * |
||
| 31 | * @return \Illuminate\Database\Eloquent\Builder |
||
| 32 | */ |
||
| 33 | abstract public static function query(); |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Define a many-to-many relationship. |
||
| 37 | * |
||
| 38 | * @param string $related |
||
| 39 | * @param string $table |
||
| 40 | * @param string $foreignPivotKey |
||
| 41 | * @param string $relatedPivotKey |
||
| 42 | * @param string $parentKey |
||
| 43 | * @param string $relatedKey |
||
| 44 | * @param string $relation |
||
| 45 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
| 46 | */ |
||
| 47 | abstract public function belongsToMany( |
||
| 48 | $related, |
||
| 49 | $table = null, |
||
| 50 | $foreignPivotKey = null, |
||
| 51 | $relatedPivotKey = null, |
||
| 52 | $parentKey = null, |
||
| 53 | $relatedKey = null, |
||
| 54 | $relation = null |
||
| 55 | ); |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Define a polymorphic many-to-many relationship. |
||
| 59 | * |
||
| 60 | * @param string $related |
||
| 61 | * @param string $name |
||
| 62 | * @param string $table |
||
| 63 | * @param string $foreignPivotKey |
||
| 64 | * @param string $relatedPivotKey |
||
| 65 | * @param string $parentKey |
||
| 66 | * @param string $relatedKey |
||
| 67 | * @param bool $inverse |
||
| 68 | * @return \Illuminate\Database\Eloquent\Relations\MorphToMany |
||
| 69 | */ |
||
| 70 | abstract public function morphToMany( |
||
| 71 | $related, |
||
| 72 | $name, |
||
| 73 | $table = null, |
||
| 74 | $foreignPivotKey = null, |
||
| 75 | $relatedPivotKey = null, |
||
| 76 | $parentKey = null, |
||
| 77 | $relatedKey = null, |
||
| 78 | $inverse = false |
||
| 79 | ); |
||
| 80 | } |
||
| 81 |