Commit d7fcd74a authored by Taylor Otwell's avatar Taylor Otwell

added with helper.

parent be144288
...@@ -362,4 +362,15 @@ function str_contains($haystack, $needle) ...@@ -362,4 +362,15 @@ function str_contains($haystack, $needle)
function value($value) function value($value)
{ {
return ($value instanceof Closure) ? call_user_func($value) : $value; return ($value instanceof Closure) ? call_user_func($value) : $value;
}
/**
* Short-cut for constructor method chaining.
*
* @param mixed $object
* @return mixed
*/
function with($object)
{
return $object;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment