'array', 'start_date' => 'date', 'end_date' => 'date', ]; public function project() { return $this->belongsTo(Project::class); } public function paymentTemplate() { return $this->belongsTo(PaymentTemplate::class); } public function phaseProducts() { return $this->hasMany(SalesPhaseProduct::class); } public function products() { return $this->belongsToMany(Product::class, 'sales_phase_products') ->using(SalesPhaseProduct::class) ->withPivot('id', 'sale_price', 'land_value', 'foundation_value', 'discount_details', 'status') ->withTimestamps(); } }