This commit is contained in:
denisdulici
2018-04-27 17:42:45 +03:00
parent 4b56001806
commit 7a595608d5
6 changed files with 11 additions and 11 deletions

View File

@ -7,20 +7,20 @@ use App\Models\Model;
class Recurring extends Model
{
protected $table = 'recurrings';
protected $table = 'recurring';
/**
* Attributes that should be mass-assignable.
*
* @var array
*/
protected $fillable = ['company_id', 'recurrable_id', 'recurrable_type', 'frequency', 'interval', 'started_at', 'count'];
protected $fillable = ['company_id', 'recurable_id', 'recurable_type', 'frequency', 'interval', 'started_at', 'count'];
/**
* Get all of the owning recurrable models.
*/
public function recurrable()
public function recurable()
{
return $this->morphTo();
}

View File

@ -88,7 +88,7 @@ class Bill extends Model
public function recurring()
{
return $this->morphOne('App\Models\Common\Recurring', 'recurrable');
return $this->morphOne('App\Models\Common\Recurring', 'recurable');
}
public function status()

View File

@ -69,7 +69,7 @@ class Payment extends Model
public function recurring()
{
return $this->morphOne('App\Models\Common\Recurring', 'recurrable');
return $this->morphOne('App\Models\Common\Recurring', 'recurable');
}
public function transfers()

View File

@ -94,7 +94,7 @@ class Invoice extends Model
public function recurring()
{
return $this->morphOne('App\Models\Common\Recurring', 'recurrable');
return $this->morphOne('App\Models\Common\Recurring', 'recurable');
}
public function status()

View File

@ -80,7 +80,7 @@ class Revenue extends Model
public function recurring()
{
return $this->morphOne('App\Models\Common\Recurring', 'recurrable');
return $this->morphOne('App\Models\Common\Recurring', 'recurable');
}
public function transfers()