Skip to content

[Trait] Timezonable

Shawn Clake edited this page Feb 6, 2017 · 1 revision

Timezonable Trait

Usage

  1. Add this trait to a model:

     use Clake\UserExtended\Traits\Timezonable;
    
  2. Add a protected data member to your model:

     protected $timezonable = [
         'created_at',
         'updated_at'
     ];
    

    This contains model attributes to convert to a users timezone

  3. The trait will automatically convert timezones when using the model attributes specified. Defaults to UTC.

Support

Contact me: shawn.clake@gmail.com

Plugin Marketplace

OctoberCMS - UserExtended

Demo

Demo Site

Clone this wiki locally