Paragonik/ReceiptItem.php

22 lines
467 B
PHP
Raw Normal View History

2020-01-13 17:51:49 +01:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ReceiptItem extends Model
{
protected $table = 'receipt_items';
protected $fillable = ['id', 'name', 'price', 'quantity' , 'receipt_id', 'category_id', 'created_at', 'updated_at'];
public function receipts()
{
return $this->belongsTo('App\Models\Receipt');
}
public function categories()
{
return $this->hasMany('App\Models\Category');
}
}