order list added
This commit is contained in:
24
app/Models/Order.php
Normal file
24
app/Models/Order.php
Normal 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user