Using morphTo() on services, added Ezypay payment Import

This commit is contained in:
Deon George
2019-06-07 16:54:27 +10:00
parent 41d6a07196
commit 253eb55c19
33 changed files with 11398 additions and 183 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Models\Base;
use Illuminate\Database\Eloquent\Model;
use App\Traits\NextKey;
abstract class ServiceType extends Model
{
use NextKey;
public $timestamps = FALSE;
public $dateFormat = 'U';
/**
* @NOTE: The service_id column could be discarded, if the id column=service_id
* @return \Illuminate\Database\Eloquent\Relations\MorphOne
*/
public function service()
{
return $this->morphOne(Service::class,'type','model','id');
}
}