Paragonik/paragonik-backend/app/Models/ReceiptItem.php
2019-12-08 21:55:07 +01:00

22 lines
467 B
PHP

<?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');
}
}