Skip to content

Commit

Permalink
Fix trashed implicitBinding with child with no softdelete (#41282) (#…
Browse files Browse the repository at this point in the history
…41814)

(cherry picked from commit b8be411c27ae9f0ef822dab0c1e6c48beb3e06e1)

Co-authored-by: Jori Stein <44996807+stein-j@users.noreply.github.com>
  • Loading branch information
BrandonSurowiec and stein-j committed Apr 4, 2022
1 parent 791f1a5 commit 0205128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ImplicitRouteBinding.php
Expand Up @@ -43,7 +43,7 @@ public static function resolveForRoute($container, $route)
: 'resolveRouteBinding';

if ($parent instanceof UrlRoutable && ($route->enforcesScopedBindings() || array_key_exists($parameterName, $route->bindingFields()))) {
$childRouteBindingMethod = $route->allowsTrashedBindings()
$childRouteBindingMethod = $route->allowsTrashedBindings() && in_array(SoftDeletes::class, class_uses_recursive($instance))
? 'resolveSoftDeletableChildRouteBinding'
: 'resolveChildRouteBinding';

Expand Down

0 comments on commit 0205128

Please sign in to comment.