| 1 | <?php |
||
| 7 | class Visit extends Model |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $table = 'visits'; |
||
| 13 | /** |
||
| 14 | * @var bool |
||
| 15 | */ |
||
| 16 | public $timestamps = true; |
||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $fillable = ['smo_code', 'poc', 'phone', 'comment', 'visit_date', 'expiration_date', 'author_id', 'user_id']; |
||
| 21 | |||
| 22 | public function user() |
||
| 26 | |||
| 27 | public function author() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Allows you to call activeUsers() on notes |
||
| 34 | * to return only notes with active users. |
||
| 35 | * |
||
| 36 | * @param $query |
||
| 37 | * |
||
| 38 | * @return mixed |
||
| 39 | */ |
||
| 40 | public function scopeActiveUsers($query) |
||
| 46 | } |
||
| 47 |