DateFactory
class DateFactory (View source)
Constants
DEFAULT_CLASS_NAME | The default class that will be used for all created dates. |
Properties
static protected string | $dateClass | The type (class) of dates that should be created. | |
static protected callable | $callable | This callable may be used to intercept date creation. | |
static protected object | $factory | The Carbon factory that should be used when creating dates. |
Methods
static mixed | use(mixed $handler) Use the given handler when generating dates (class name, callable, or factory). | |
static void | useDefault() Use the default date class when generating dates. | |
static void | useCallable(callable $callable) Execute the given callable on each date creation. | |
static void | useClass(string $dateClass) Use the given date type (class) when generating dates. | |
static void | useFactory(object $factory) Use the given Carbon factory when generating dates. | |
mixed | __call(string $method, array $parameters) Handle dynamic calls to generate dates. |
Details
static mixed use(mixed $handler)
Use the given handler when generating dates (class name, callable, or factory).
static void useDefault()
Use the default date class when generating dates.
static void useCallable(callable $callable)
Execute the given callable on each date creation.
static void useClass(string $dateClass)
Use the given date type (class) when generating dates.
static void useFactory(object $factory)
Use the given Carbon factory when generating dates.
mixed __call(string $method, array $parameters)
Handle dynamic calls to generate dates.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/6.x/Illuminate/Support/DateFactory.html