2013-11-28 17:40:13 +01:00
|
|
|
<?php
|
|
|
|
|
2013-12-04 17:20:14 +01:00
|
|
|
class Invitation extends EntityModel
|
2013-11-28 17:40:13 +01:00
|
|
|
{
|
2013-12-04 17:20:14 +01:00
|
|
|
protected $hidden = array('id', 'created_at', 'updated_at', 'deleted_at', 'viewed_date');
|
|
|
|
|
2013-11-28 17:40:13 +01:00
|
|
|
public function invoice()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('Invoice');
|
|
|
|
}
|
2013-12-02 13:22:29 +01:00
|
|
|
|
|
|
|
public function contact()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('Contact');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('User');
|
|
|
|
}
|
2013-11-28 17:40:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Invitation::created(function($invitation)
|
|
|
|
{
|
|
|
|
Activity::emailInvoice($invitation);
|
|
|
|
});
|