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