mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-26 09:02:53 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			776 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			776 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Invoice Ninja (https://invoiceninja.com).
 | |
|  *
 | |
|  * @link https://github.com/invoiceninja/invoiceninja source repository
 | |
|  *
 | |
|  * @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
 | |
|  *
 | |
|  * @license https://opensource.org/licenses/AAL
 | |
|  */
 | |
| 
 | |
| namespace App\Models;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\Model;
 | |
| 
 | |
| class PaymentHash extends Model
 | |
| {
 | |
|     protected $guarded = ['id'];
 | |
| 
 | |
|     protected $casts = [
 | |
|         'data' => 'object',
 | |
|     ];
 | |
| 
 | |
|     
 | |
|     public function invoices()
 | |
|     {
 | |
|         return $this->data->invoices;
 | |
|     }
 | |
| 
 | |
|     public function payment()
 | |
|     {
 | |
|         return $this->belongsTo(Payment::class)->withTrashed();
 | |
|     }
 | |
| 
 | |
|     public function fee_invoice()
 | |
|     {
 | |
|         return $this->belongsTo(Invoice::class, 'fee_invoice_id', 'id');
 | |
|     }
 | |
| }
 |