Skip to content

Commit b99faae

Browse files
committed
Tidy up README.md
1 parent a670ce7 commit b99faae

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Route::get('/customer/{customer}', function (Customer $customer) {
4242
```php
4343
$customer = Customer::create(['name' => 'Squidward']);
4444

45-
$customer->id // 1
46-
$customer->sqid // 3irWXI2rFV
45+
$customer->id; // 1
46+
$customer->sqid; // 3irWXI2rFV
4747
```
4848

4949
`example.com/customer/3irWXI2rFV` now returns the Customer details.
@@ -132,7 +132,7 @@ You can also generate alphabets for multiple models at once.
132132
php artisan sqids:alphabet App\Models\Customer App\Models\Order App\Models\Invoice
133133
```
134134

135-
Follow the instructions provided by the command to add the new keys to your config and `.env` file.
135+
Follow the instructions provided by the command to add the new keys to your `config/sqids.php` and `.env` files.
136136

137137
### Confirm alphabet is being used
138138

@@ -142,7 +142,7 @@ To ensure that Eloquent Calamari is using the expected alphabet for a specific m
142142
php artisan sqids:check
143143
```
144144

145-
This command will list all the models that have successfully been registered in the config and whether or not the class string can be resolve to a class in the application.
145+
This will list all the models that have successfully been registered in the config and whether the class string can be resolved to a class in your application.
146146

147147
### Setting minimum Sqid lengths
148148

@@ -156,6 +156,8 @@ By default, all Sqids will be a minimum of 10 characters. You can adjust this fo
156156
],
157157
```
158158

159+
The maximum length of a Sqid is dependent on the input ID and the alphabet used. A more varied alphabet (upper and lower case letters, numbers and symbols) will result in shorter Sqids.
160+
159161
### Canonical Sqids
160162
By design, [multiple Sqids can resolve to the same number](https://sqids.org/faq#collisions), however Eloquent Calamari will always return the same Sqid for a given number. Furthermore, this is the only Sqid that can be used to access an entity, and any other Sqid that would normally resolve to the same number will be rejected.
161163

0 commit comments

Comments
 (0)