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.
2 parents 3b75300 + 3897311 commit d8ae9c0Copy full SHA for d8ae9c0
src/HasSlug.php
@@ -260,14 +260,12 @@ public function resolveRouteBinding($value, $field = null)
260
->get();
261
262
// If we have zero or multiple results, don't guess
263
- if($results->count() !== 1) {
264
- return;
+ if($results->count() === 1) {
+ return $results->first();
265
}
266
267
// Redirect to the current route using the translated model key
268
- return abort(301, '', ['Location' => $results->first()->getSluggedUrlForRoute(
269
- Router::current(), $locale, false
270
- )]);
+ return abort(404);
271
272
273
/**
0 commit comments