callback)) { throw new \Exception("The validation callback for the [$attribute] attribute is not callable."); } if ( ! is_null($nullable = parent::check($attribute, $attributes))) { return $nullable; } return call_user_func($this->callback, $attributes[$attribute]); } /** * Set the validation callback. * * @param function $callback * @return With_Callback */ public function using($callback) { $this->callback = $callback; return $this; } }