'datetime', 'date_end' => 'datetime', ]; /** * BelongsToMany products relation * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function products() { return $this->belongsToMany(Product::class); } /** * BelongsTo discountType relation * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function discountType() { return $this->belongsTo(DiscountType::class, 'discount_type_id'); } }