Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Sep 23, 2024
2 parents 73627df + 360f97e commit 458e63d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class Visit extends Model {}

Then, create models with whatever data you'd like:

> [!important] Values you assign to model attributes are always stored as strings in Redis.
> [!important]
> Values you assign to model attributes are always stored as strings in Redis.
```php
use App\Redis\Visit;
Expand Down Expand Up @@ -150,7 +151,8 @@ ActiveRedis will always generate a new UUID in the key's attribute if you do not

To change this behaviour or generate your own unique keys, you may override the `getNewKey()` method:

> [!important] Do not generate keys with colons (:) or asterisks (*). They are reserved characters in Redis.
> [!important]
> Do not generate keys with colons (:) or asterisks (*). They are reserved characters in Redis.
```php
namespace App\Redis;
Expand All @@ -173,7 +175,8 @@ class Visit extends Model

Models will also maintain `created_at` and `updated_at` attributes:

> [!important] Timestamp attributes will be returned as `Carbon` instances when accessed.
> [!important]
> Timestamp attributes will be returned as `Carbon` instances when accessed.
```php
$visit->created_at; // \Carbon\Carbon('2024-01-01 00:00:00')
Expand Down Expand Up @@ -389,4 +392,4 @@ If you would like to throw an exception when the model is not found, you may use

```php
Visit::findOrFail('missing'); // ModelNotFoundException
```
```

0 comments on commit 458e63d

Please sign in to comment.