Finally found the answer. I need to override resolveSoftDeletableRouteBinding
method instead of resolveRouteBinding
method like this:
Models/SoftDeletedModel.php
use SoftDeletes;
public function resolveSoftDeletableRouteBinding($value, $field = null) {
dd("Successfully Substituted Bindings when using WithTrashed."); // This now works;
return parent::resolveSoftDeletableRouteBinding($value, $field);
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community