| Total Complexity | 5 |
| Total Lines | 65 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | abstract class Model extends IlluminateModel |
||
| 10 | { |
||
| 11 | use Concerns\HasRelationships; |
||
| 12 | |||
| 13 | |||
| 14 | /** |
||
| 15 | * The primary key for the model. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $primaryKey = '_key'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The primary key type. |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $keyType = 'string'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @override |
||
| 29 | * Create a new Eloquent query builder for the model. |
||
| 30 | * |
||
| 31 | * @param QueryBuilder $query |
||
| 32 | * @return Builder |
||
| 33 | */ |
||
| 34 | public function newEloquentBuilder($query) |
||
| 35 | { |
||
| 36 | return new Builder($query); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get a new query builder instance for the connection. |
||
| 41 | * |
||
| 42 | * @return \Illuminate\Database\Query\Builder |
||
| 43 | */ |
||
| 44 | protected function newBaseQueryBuilder() |
||
| 45 | { |
||
| 46 | return $this->getConnection()->query(); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Qualify the given column name by the model's table. |
||
| 51 | * |
||
| 52 | * @param string $column |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function qualifyColumn($column) |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Get the default foreign key name for the model. |
||
| 68 | * |
||
| 69 | * @return string |
||
| 70 | */ |
||
| 71 | public function getForeignKey() |
||
| 76 |