Support the ongoing development of →
Eloquent Laravel Routing
Last updated 1 year ago.

Finally found the answer. I need to override resolveSoftDeletableRouteBinding method instead of resolveRouteBinding method like this:


use SoftDeletes;

public function resolveSoftDeletableRouteBinding($value, $field = null) {
    dd("Successfully Substituted Bindings when using WithTrashed."); // This now works;
    return parent::resolveSoftDeletableRouteBinding($value, $field);
Solution selected by @dopesky

Sign in to participate in this thread!


Your banner here too?

Kevin Mwenda dopesky Joined 3 Dec 2021


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.