Download the PHP package maartenpaauw/laravel-date-time-zone-cast without Composer
On this page you can find all versions of the php package maartenpaauw/laravel-date-time-zone-cast. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download maartenpaauw/laravel-date-time-zone-cast
More information about maartenpaauw/laravel-date-time-zone-cast
Files in maartenpaauw/laravel-date-time-zone-cast
Package laravel-date-time-zone-cast
Short Description A Laravel cast to convert strings to DateTimeZone instances
License MIT
Homepage https://github.com/maartenpaauw/laravel-date-time-zone-cast
Informations about the package laravel-date-time-zone-cast
A Laravel cast to convert strings to DateTimeZone instances
A Laravel cast that allows you to store and retrieve DateTimeZone objects in your Eloquent models. This cast
automatically converts timezone strings (e.g. 'Europe/Amsterdam') to PHP DateTimeZone instances and vice versa when
interacting with your database.
Support Me
You can support me by buying Model States for Filament.
Installation
You can install the package via composer:
Usage
1. Add the Cast to Your Model
Add the cast to your Eloquent model's $casts array:
2. Database Schema
Ensure your database column is set up to store timezone strings:
3. Working with the Model
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- Maarten Paauw
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-date-time-zone-cast with dependencies
illuminate/contracts Version ^12.18|^13.0
illuminate/database Version ^12.18|^13.0