| Total Complexity | 6 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 10 | class Guest extends UuidModel |
||
| 11 | { |
||
| 12 | use ImageableTrait, StorageTrait; |
||
| 13 | |||
| 14 | protected $table = 'fg_guests'; |
||
| 15 | protected $guarded = ['id']; |
||
| 16 | |||
| 17 | protected $hidden = [ |
||
| 18 | 'created_at', |
||
| 19 | 'updated_at', |
||
| 20 | 'event_id', |
||
| 21 | ]; |
||
| 22 | |||
| 23 | public function event() |
||
| 24 | { |
||
| 25 | return $this->belongsTo(Event::class); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getTitleAttribute($val) |
||
| 29 | { |
||
| 30 | return Str::title($val); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getNameAttribute($val) |
||
| 34 | { |
||
| 35 | return Str::title($val); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getFileName() |
||
| 39 | { |
||
| 40 | return $this->image->name; |
||
|
|
|||
| 41 | } |
||
| 42 | |||
| 43 | public function filesDir() |
||
| 46 | } |
||
| 47 | |||
| 48 | public function getImageDimensions() |
||
| 52 | ]; |
||
| 53 | } |
||
| 54 | } |
||
| 55 |
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.