We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abcc448 commit ee2c71eCopy full SHA for ee2c71e
tests/RouteModelBindingTest.php
@@ -12,6 +12,16 @@
12
->assertContent(value: $customer->name);
13
});
14
15
+it('can bind a model from a sqid without a prefix', function (): void {
16
+ config()->set('sqids.prefix_class');
17
+
18
+ $customer = CustomerFactory::new()->create();
19
20
+ $this
21
+ ->get(uri: "/customers/{$customer->sqid}")
22
+ ->assertContent(value: $customer->name);
23
+});
24
25
it('returns a 404 if the sqid is invalid', function (): void {
26
$this
27
->get(uri: "/customers/invalid-sqid")
0 commit comments