1 | <?php namespace Arcanedev\LaravelTracker\Models; |
||
15 | abstract class AbstractModel extends Model |
||
16 | { |
||
17 | /* ------------------------------------------------------------------------------------------------ |
||
18 | | Constructor |
||
19 | | ------------------------------------------------------------------------------------------------ |
||
20 | */ |
||
21 | /** |
||
22 | * Create a new Eloquent model instance. |
||
23 | * |
||
24 | * @param array $attributes |
||
25 | */ |
||
26 | 66 | public function __construct(array $attributes = []) |
|
33 | |||
34 | /* ------------------------------------------------------------------------------------------------ |
||
35 | | Other Functions |
||
36 | | ------------------------------------------------------------------------------------------------ |
||
37 | */ |
||
38 | /** |
||
39 | * Get the tracker config. |
||
40 | * |
||
41 | * @param string $key |
||
42 | * @param mixed|null $default |
||
43 | * |
||
44 | * @return mixed |
||
45 | */ |
||
46 | 66 | protected function getConfig($key, $default = null) |
|
50 | |||
51 | /* ------------------------------------------------------------------------------------------------ |
||
52 | | Laravel 5.2 & 5.1 Support |
||
53 | | ------------------------------------------------------------------------------------------------ |
||
54 | */ |
||
55 | /** |
||
56 | * Handle dynamic method calls into the model. |
||
57 | * |
||
58 | * @param string $method |
||
59 | * @param array $parameters |
||
60 | * |
||
61 | * @return mixed |
||
62 | */ |
||
63 | 60 | public function __call($method, $parameters) |
|
70 | |||
71 | /** |
||
72 | * Get the first record matching the attributes or create it. |
||
73 | * |
||
74 | * @param array $attributes |
||
75 | * @param array $values |
||
76 | * |
||
77 | * @return self |
||
78 | */ |
||
79 | 40 | public function customFirstOrCreate(array $attributes, array $values = []) |
|
94 | } |
||
95 |