/** * Apply the callback's query changes if the given "value" is true. * * @param bool $value * @param \Closure $callback * @return $this * @static */ public static function when($value, $callback) { return \Illuminate\Database\Eloquent\Builder::when($value, $callback); }