1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/app/models/Invitation.php
Hillel Coren 99800f38dd Bug fixes
2013-12-04 00:00:01 +02:00

32 lines
545 B
PHP

<?php
class Invitation extends Eloquent
{
protected $softDelete = true;
protected $hidden = array('created_at', 'updated_at', 'deleted_at');
public function scopeScope($query)
{
return $query->whereAccountId(Auth::user()->account_id);
}
public function invoice()
{
return $this->belongsTo('Invoice');
}
public function contact()
{
return $this->belongsTo('Contact');
}
public function user()
{
return $this->belongsTo('User');
}
}
Invitation::created(function($invitation)
{
Activity::emailInvoice($invitation);
});