We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 9 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class User extends Model |
||
| 9 | { |
||
| 10 | use CrudTrait; |
||
|
|
|||
| 11 | |||
| 12 | protected $table = 'users'; |
||
| 13 | protected $fillable = ['name', 'email', 'password']; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Get the account details associated with the user. |
||
| 17 | */ |
||
| 18 | public function accountDetails() |
||
| 19 | { |
||
| 20 | return $this->hasOne('Backpack\CRUD\Tests\Unit\Models\AccountDetails'); |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Get the articles for this user. |
||
| 25 | */ |
||
| 26 | public function articles() |
||
| 27 | { |
||
| 28 | return $this->hasMany('Backpack\CRUD\Tests\Unit\Models\Article'); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Get the user roles. |
||
| 33 | */ |
||
| 34 | public function roles() |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getNameComposedAttribute() |
||
| 42 | } |
||
| 43 | |||
| 44 | public function comment() |
||
| 45 | { |
||
| 46 | return $this->morphOne('Backpack\CRUD\Tests\Unit\Models\Comment', 'commentable'); |
||
| 47 | } |
||
| 48 | |||
| 49 | public function recommends() |
||
| 50 | { |
||
| 51 | return $this->morphToMany('Backpack\CRUD\Tests\Unit\Models\Recommend', 'recommendable')->withPivot('text'); |
||
| 52 | } |
||
| 53 | |||
| 54 | public function bills() |
||
| 55 | { |
||
| 56 | return $this->morphToMany('Backpack\CRUD\Tests\Unit\Models\Bill', 'billable'); |
||
| 57 | } |
||
| 58 | |||
| 59 | public function stars() |
||
| 62 | } |
||
| 63 | |||
| 64 | public function superArticles() |
||
| 67 | } |
||
| 68 | } |
||
| 69 |