Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class HouseAd extends Model |
||
9 | { |
||
10 | |||
11 | protected $guarded = []; |
||
12 | |||
13 | protected $hidden = ['game_id', 'image_portrait', 'image_landscape', 'confirmed_count', 'cancelled_count', 'start_at', 'end_at', 'created_at', 'updated_at']; |
||
14 | |||
15 | protected $appends = ['url_image_portrait', 'url_image_landscape', 'game']; |
||
16 | |||
17 | public function getUrlImagePortraitAttribute() |
||
18 | { |
||
19 | return url('/images/'.$this->image_portrait); |
||
20 | } |
||
21 | |||
22 | public function getUrlImageLandscapeAttribute() |
||
25 | } |
||
26 | |||
27 | public function game() |
||
28 | { |
||
29 | return $this->belongsTo(Game::class); |
||
30 | } |
||
31 | |||
32 | public function getGameAttribute() |
||
35 | } |
||
36 | |||
38 |