mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 15:37:30 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			692 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			692 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php namespace App\Models;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\SoftDeletes;
 | |
| 
 | |
| class Invitation extends EntityModel
 | |
| {
 | |
|     use SoftDeletes;
 | |
|     protected $dates = ['deleted_at'];
 | |
| 
 | |
|     public function invoice()
 | |
|     {
 | |
|         return $this->belongsTo('App\Models\Invoice');
 | |
|     }
 | |
| 
 | |
|     public function contact()
 | |
|     {
 | |
|         return $this->belongsTo('App\Models\Contact')->withTrashed();
 | |
|     }
 | |
| 
 | |
|     public function user()
 | |
|     {
 | |
|         return $this->belongsTo('App\Models\User')->withTrashed();
 | |
|     }
 | |
| 
 | |
|     public function account()
 | |
|     {
 | |
|         return $this->belongsTo('App\Models\Account');
 | |
|     }
 | |
| 
 | |
|     public function getLink()
 | |
|     {
 | |
|         return SITE_URL.'/view/'.$this->invitation_key;
 | |
|     }
 | |
| }
 |