Skip to content

Commit 2dbc066

Browse files
authored
Merge pull request #1 from billrobclark/HOTFIX-Readme-Typo
HOTFIX-Readme-Typo
2 parents 70c331d + 10c341e commit 2dbc066

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
# ⏳🗺 Dates Timezone Conversion Trait
22

3-
This package provides a trait that automatically converts an Eloquent
3+
This package provides a trait that automatically converts an Eloquent
44
model's dates to and from the current user's timezone.
55

66
## Installation
77

8-
Dates Timezone Conversion Trait can be easily installed using Composer.
8+
Dates Timezone Conversion Trait can be easily installed using Composer.
99
Just run the following command from the root of your project.
1010

1111
```
1212
composer require divineomega/dates-timezone-conversion-trait
1313
```
1414

15-
If you have never used the Composer dependency manager before, head
16-
to the [Composer website](https://getcomposer.org/) for more
15+
If you have never used the Composer dependency manager before, head
16+
to the [Composer website](https://getcomposer.org/) for more
1717
information on how to get started.
1818

1919
## Usage
2020

2121
First, you must add a `timezone` field to your application's main `User`
22-
model and populate it will an appropriate timezone. Please see this [list
22+
model and populate it with an appropriate timezone. Please see this [list
2323
of supported timezones](https://secure.php.net/manual/en/timezones.php).
2424

25-
Then, to benefit from this trait, simply `use` it within any Eloquent Model.
25+
Then, to benefit from this trait, simply `use` it within any Eloquent Model.
2626
An example of a `User` model with the trait being used is shown below.
2727

2828
```php
@@ -37,24 +37,24 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
3737
class User extends Authenticatable
3838
{
3939
use Notifiable, DatesTimezoneConversion;
40-
40+
4141
protected $dates = [
4242
'last_logged_in_at',
4343
'created_at',
4444
'updated_at'
4545
];
46-
46+
4747
/* snipped */
4848
}
4949
```
5050

51-
After using the trait, the following transformation will automatically be
52-
applied to any attributes defined in the model's `$dates` array, if a
51+
After using the trait, the following transformation will automatically be
52+
applied to any attributes defined in the model's `$dates` array, if a
5353
user is currently logged in.
5454

5555
* When reading an attribute (e.g. `$user->last_logged_in_at`), the datetime
5656
object will automatically be converted to the user's timezone.
5757

5858
* When writing to an attribute (e.g. `$user->last_logged_in_at`), the datetime
59-
will automatically be converted to the Laravel application's timezone (as
59+
will automatically be converted to the Laravel application's timezone (as
6060
defined in the `config/app.php` file).

0 commit comments

Comments
 (0)