schedule_time = $schedule_date; } /** * Determine if the validation rule passes. * * @param string $attribute * @param mixed $value * @return bool */ public function passes($attribute, $value) { if($value && Carbon::parse($value)->diffInSeconds() <= 120) { return false; } return true; } /** * Get the validation error message. * * @return string */ public function message() { return "You cannot schedule within the next 2 minutes."; } }