'Laravel Route Model Binding, shows 404 when i passed encrypted Id for Editing

When i used to edit Language table i have used route model binding method which is more easier. but my client have a requirement that all the id's passing through URL should be encrypted. here my attempt failed with 404

edit.blade.blade

   <a href="{{ route('admin.languages.edit', ['language' => encrypt($language->id)]) }}">
     <i class="icon-note icons"></i>
   </a>

LanguageController

 public function edit(Language $language)
 {
   return view('admin.language.edit',compact('language'));
 }

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source