akaunting/app/Models/Common/Recurring.php

28 lines
490 B
PHP
Raw Normal View History

2018-04-26 02:17:55 +03:00
<?php
namespace App\Models\Common;
use App\Models\Model;
class Recurring extends Model
{
2018-04-27 17:42:45 +03:00
protected $table = 'recurring';
2018-04-26 18:40:04 +03:00
/**
* Attributes that should be mass-assignable.
*
* @var array
*/
2018-04-27 17:42:45 +03:00
protected $fillable = ['company_id', 'recurable_id', 'recurable_type', 'frequency', 'interval', 'started_at', 'count'];
2018-04-26 18:40:04 +03:00
2018-04-26 02:17:55 +03:00
/**
* Get all of the owning recurrable models.
*/
2018-04-27 17:42:45 +03:00
public function recurable()
2018-04-26 02:17:55 +03:00
{
return $this->morphTo();
}
}