| Total Complexity | 2 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class BaseModel extends Model |
||
| 9 | { |
||
| 10 | |||
| 11 | use SoftDeletes; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * The attributes that are mass assignable. |
||
| 15 | * |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | protected $fillable = [ |
||
| 19 | 'related_id', 'related_type', 'tax', 'total', 'discount', 'currency', |
||
| 20 | 'reference', 'status', 'receiver_info', 'sender_info', 'payment_info', 'note', 'is_bill' |
||
| 21 | ]; |
||
| 22 | |||
| 23 | protected $guarded = []; |
||
| 24 | |||
| 25 | public $incrementing = false; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Get the invoice lines for this invoice |
||
| 29 | */ |
||
| 30 | public function lines() |
||
| 31 | { |
||
| 32 | return $this->hasMany(InvoiceLine::class, 'invoice_id'); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
| 37 | */ |
||
| 38 | public function related() |
||
| 41 | } |
||
| 42 | |||
| 44 |