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