order list added

This commit is contained in:
Abhishek Mali
2025-11-12 11:56:43 +05:30
parent b7085f81ab
commit 6a4f1dd4e9
6 changed files with 267 additions and 7 deletions

24
app/Models/Order.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\MarkList;
class Order extends Model
{
use HasFactory;
protected $fillable = [
'order_id', 'mark_no', 'description', 'origin', 'destination',
'ctn', 'qty', 'ttl_qty', 'unit', 'price', 'ttl_amount',
'cbm', 'ttl_cbm', 'kg', 'ttl_kg', 'shop_no', 'status'
];
// Relation using mark_no instead of id
public function markList()
{
return $this->hasOne(MarkList::class, 'mark_no', 'mark_no');
}
}