We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 7 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class AccountDetails extends Model |
||
| 9 | { |
||
| 10 | use CrudTrait; |
||
|
|
|||
| 11 | |||
| 12 | protected $table = 'account_details'; |
||
| 13 | protected $fillable = ['user_id', 'nickname', 'profile_picture', 'article_id', 'start_date', 'end_date']; |
||
| 14 | |||
| 15 | public function identifiableAttribute() |
||
| 16 | { |
||
| 17 | return 'nickname'; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Get the user for the account details. |
||
| 22 | */ |
||
| 23 | public function user() |
||
| 24 | { |
||
| 25 | return $this->belongsTo('Backpack\CRUD\Tests\config\Models\User'); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function addresses() |
||
| 29 | { |
||
| 30 | return $this->hasMany('Backpack\CRUD\Tests\config\Models\Address'); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getNicknameComposedAttribute() |
||
| 34 | { |
||
| 35 | return $this->nickname.'++'; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function article() |
||
| 41 | } |
||
| 42 | |||
| 43 | public function bangs() |
||
| 44 | { |
||
| 45 | return $this->belongsToMany('Backpack\CRUD\Tests\config\Models\Bang'); |
||
| 46 | } |
||
| 47 | |||
| 48 | public function bangsPivot() |
||
| 51 | } |
||
| 52 | } |
||
| 53 |