orvital / core
Core package.
v0.1.30
2024-02-09 14:39 UTC
Requires
- php: ^8.2
- illuminate/auth: ^10.0
- illuminate/broadcasting: ^10.0
- illuminate/bus: ^10.0
- illuminate/cache: ^10.0
- illuminate/collections: ^10.0
- illuminate/conditionable: ^10.0
- illuminate/config: ^10.0
- illuminate/console: ^10.0
- illuminate/container: ^10.0
- illuminate/contracts: ^10.0
- illuminate/cookie: ^10.0
- illuminate/database: ^10.0
- illuminate/encryption: ^10.0
- illuminate/events: ^10.0
- illuminate/filesystem: ^10.0
- illuminate/hashing: ^10.0
- illuminate/http: ^10.0
- illuminate/log: ^10.0
- illuminate/macroable: ^10.0
- illuminate/mail: ^10.0
- illuminate/notifications: ^10.0
- illuminate/pagination: ^10.0
- illuminate/pipeline: ^10.0
- illuminate/process: ^10.0
- illuminate/queue: ^10.0
- illuminate/redis: ^10.0
- illuminate/routing: ^10.0
- illuminate/session: ^10.0
- illuminate/support: ^10.0
- illuminate/testing: ^10.0
- illuminate/translation: ^10.0
- illuminate/validation: ^10.0
- illuminate/view: ^10.0
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2024-04-09 16:34:34 UTC
README
Core package.
Service Container
Typed Container Resolver
Use the makeAs
method to resolve from the container a class instance of a specific type.
makeAs(string $abstract, array $parameters = [], string $expected = null): mixed
Usage
If you bound an object to its class-string
$typed = app()->makeAs(Bound::class);
Of course, you can pass in parameters
$typed = app()->makeAs(Bound::class, []);
If you bound an object with a magic string
$typed = app()->makeAs('magic-string', [], Bound::class);
Eloquent
Date Serialization
/** * Prepare a date for array / JSON serialization. * * toIso8601ZuluString() 2019-02-01T03:45:27Z * toDateTimeLocalString() 2019-02-01T03:45:27 * toRfc822String() Fri, 01 Feb 19 03:45:27 +0000 * toRfc850String() Friday, 01-Feb-19 03:45:27 UTC * toRfc1036String() Fri, 01 Feb 19 03:45:27 +0000 * toRfc1123String() Fri, 01 Feb 2019 03:45:27 +0000 * toRfc2822String() Fri, 01 Feb 2019 03:45:27 +0000 * toRfc3339String() 2019-02-01T03:45:27+00:00 * toRfc7231String() Fri, 01 Feb 2019 03:45:27 GMT * toRssString() Fri, 01 Feb 2019 03:45:27 +0000 * toW3cString() 2019-02-01T03:45:27+00:00 */ protected function serializeDate(DateTimeInterface $date): string { return $date->toIso8601ZuluString(); }