✏️ Edit: OrderDetail.php
Path:
/home/thiqat5/tmphone.thiqatech.com/tm/app/Model/OrderDetail.php
Size: 732 B · Modified: 2021-11-17 23:00:14 · Perm: 0644 · Writable
← Back to directory
👁 View
⬇ Download
<?php namespace App\Model; use Illuminate\Database\Eloquent\Model; class OrderDetail extends Model { protected $casts = [ 'product_id' => 'integer', 'order_id' => 'integer', 'price' => 'float', 'discount_on_product' => 'float', 'quantity' => 'integer', 'tax_amount' => 'float', 'created_at' => 'datetime', 'updated_at' => 'datetime' ]; public function product() { return $this->belongsTo(Product::class, 'product_id'); } public function order() { return $this->belongsTo(Order::class, 'order_id'); } public function review() { return $this->belongsTo(Review::class, 'order_id','order_id'); } }
💾 Save
Cancel
Save as UTF-8, newlines normalized to LF