Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | abstract class Model extends BaseModel |
||
12 | { |
||
13 | use ChronosRelations; |
||
14 | use ChronosTimestamps; |
||
15 | |||
16 | /** |
||
17 | * Create a new pivot model instance. |
||
18 | * |
||
19 | * @param \Illuminate\Database\Eloquent\Model $parent |
||
20 | * @param array $attributes |
||
21 | * @param string $table |
||
22 | * @param bool $exists |
||
23 | * @param string|null $using |
||
24 | * @return \Cino\LaravelChronos\Eloquent\Relations\Pivot |
||
25 | */ |
||
26 | public function newPivot(BaseModel $parent, array $attributes, $table, $exists, $using = null) |
||
27 | { |
||
28 | return $using ? $using::fromRawAttributes($parent, $attributes, $table, $exists) |
||
29 | : Pivot::fromAttributes($parent, $attributes, $table, $exists); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Reload the current model instance with fresh attributes from the database. |
||
34 | * |
||
35 | * @return \Illuminate\Database\Eloquent\Model |
||
36 | */ |
||
37 | public function refresh() |
||
54 | } |
||
55 | } |
||
56 |