request = $request; } /** * Determine if the validation rule passes. * * @param string $attribute * @param mixed $value * @return bool */ public function passes($attribute, $value) { if(isset($this->request->promotion_uuid) && $this->request->promotion_uuid != '') { $promotion = Promotions::where('promotion_uuid',$this->request->promotion_uuid)->first(); if($promotion) { if(strtotime($promotion->date_start) > strtotime($value)) return false; } } return true; } /** * Get the validation error message. * * @return string */ public function message() { return 'Invalid Date Start'; } }