Current File : /home/tradevaly/www/app/Models/ProductInvoices.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;

class ProductInvoices extends Model
{
    use HasFactory;
    
    public function user(){
        return $this->belongsTo(User::class, 'buyer_id', 'id');
    }
    public function transaction(){
        return $this->belongsTo(Transaction::class, 'transaction_id', 'id');
    }
   
}