mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-28 03:13:26 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			47 lines
		
	
	
		
			994 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			994 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Invoice Ninja (https://invoiceninja.com).
 | |
|  *
 | |
|  * @link https://github.com/invoiceninja/invoiceninja source repository
 | |
|  *
 | |
|  * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
 | |
|  *
 | |
|  * @license https://www.elastic.co/licensing/elastic-license
 | |
|  */
 | |
| 
 | |
| namespace App\Models;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\Relations\Pivot;
 | |
| use Illuminate\Database\Eloquent\SoftDeletes;
 | |
| 
 | |
| class Paymentable extends Pivot
 | |
| {
 | |
|     use SoftDeletes;
 | |
| 
 | |
|     protected $table = 'paymentables';
 | |
| 
 | |
|     //protected $dateFormat = 'Y-m-d H:i:s.u';
 | |
| 
 | |
|     /**
 | |
|      * The attributes that should be cast to native types.
 | |
|      *
 | |
|      * @var array
 | |
|      */
 | |
|     protected $casts = [
 | |
|         'updated_at' => 'timestamp',
 | |
|         'created_at' => 'timestamp',
 | |
|         'deleted_at' => 'timestamp',
 | |
|         'settings' => 'object',
 | |
|     ];
 | |
| 
 | |
|     public function paymentable()
 | |
|     {
 | |
|         return $this->morphTo();
 | |
|     }
 | |
| 
 | |
|     public function payment()
 | |
|     {
 | |
|         return $this->belongsTo(Payment::class);
 | |
|     }
 | |
| }
 |