Showing 7 of 1,216 result(s)
The data_get function is identical in behavior to both the array_get and object_get function. The difference is that the data_get function will accept both objects and arrays as its $target input value.The signature of the data_get function is:If...
The class_basename function will return the name of the class represented by the provided value.The signature of the class_basename function is:The class_basename will return the base name of the given $class . The examples that follow will use...
The now helper function will return a new Carbon instance initialized to the current date and time. The now function accepts an optional timezone parameter to adjust the timezone of the returned date.The signature of the now function is:The...
The optional function returns a new instance of "Illuminate\Support\Optional" with the provided value. This helper class allows you to easily retrieve a default, or null value on method return values or object properties that might not exist. This...
The object_get allows developers to retrieve properties from a given $object using dot notation. This is useful in situations where it can not be guaranteed that a provided object will have a given property, identified by the given $key .The...
The value function will return the default value of the supplied $value . Although this sounds redundant, if the supplied $value is an instance of the Closure class (an anonymous function), the function will be executed and the value will be...
The with is a useful utility function that can be used to simply return the provided values back to the caller. This can be used as an entry point for method chaining without the need to create temporary local variables. It is also possible to...