Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdullahsari committed Apr 10, 2022
1 parent 39d38e3 commit 6c03193
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,8 @@ return [
### Migrations

If you have been using `unsignedBigInteger`s for your `id` columns up until now, which is the Laravel default, you do not have to
change anything at all.

However, if you'd like to be more expressive regarding the columns' intent,
you may use the `snowflake` (alias for `id`) or `foreignSnowflake` (alias for `foreignId`)
methods in your migrations.
- Use `snowflake` to define a Snowflake column
- Use `foreignSnowflake` to reference another Snowflake (alias for `foreignId`)

```php
Schema::table('products', static function (Blueprint $table) {
Expand Down Expand Up @@ -97,6 +93,10 @@ JSON.parse("{\"a\":10n}")
Therefore, to make sure the identifiers are not truncated while deserializing them on the front-end using `JSON.parse` and alike,
you should not send actual integers but rather strings.

```php
protected $casts = ['id' => 'string'];
```

## Testing

```bash
Expand Down

0 comments on commit 6c03193

Please sign in to comment.