-
Notifications
You must be signed in to change notification settings - Fork 12
[Trait] Timezonable
Shawn Clake edited this page Feb 6, 2017
·
1 revision
-
Add this trait to a model:
use Clake\UserExtended\Traits\Timezonable;
-
Add a protected data member to your model:
protected $timezonable = [ 'created_at', 'updated_at' ];
This contains model attributes to convert to a users timezone
-
The trait will automatically convert timezones when using the model attributes specified. Defaults to UTC.
UserExtended by Shawn Clake with contributions from Quinn Bast