1 | <?php namespace Arcanedev\LaravelTracker\Models; |
||
21 | class Referer extends Model |
||
22 | { |
||
23 | /* ------------------------------------------------------------------------------------------------ |
||
24 | | Properties |
||
25 | | ------------------------------------------------------------------------------------------------ |
||
26 | */ |
||
27 | /** |
||
28 | * The table associated with the model. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $table = 'referers'; |
||
33 | |||
34 | /** |
||
35 | * The attributes that are mass assignable. |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $fillable = [ |
||
40 | 'url', |
||
41 | 'host', |
||
42 | 'domain_id', |
||
43 | 'medium', |
||
44 | 'source', |
||
45 | 'search_terms_hash', |
||
46 | ]; |
||
47 | |||
48 | /** |
||
49 | * The attributes that should be cast to native types. |
||
50 | * |
||
51 | * @var array |
||
52 | */ |
||
53 | protected $casts = [ |
||
54 | 'id' => 'integer', |
||
55 | 'domain_id' => 'integer', |
||
56 | ]; |
||
57 | |||
58 | /* ------------------------------------------------------------------------------------------------ |
||
59 | | Relationships |
||
60 | | ------------------------------------------------------------------------------------------------ |
||
61 | */ |
||
62 | /** |
||
63 | * Domain relationship. |
||
64 | * |
||
65 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
66 | */ |
||
67 | public function domain() |
||
73 | } |
||
74 |