I have installed and configured the latest version (2.3.0) of vinkla/hashids on laravel 5.2.
I'm unsure how to implement its functionality on my URL routes.
I want to obsfucate all id attributes which are displayed in my URL routes.
For example- http://localhost:8000/profile/3/edit should become http://localhost:8000/profile/xyz/edit.
I have tried overriding the following method on Illuminate\Database\Eloquent\Model.php by adding it to App\Profile.php as so-
public function getRouteKey()
{
dd('getRouteKey method');
return Hashids::encode($id);
}
My dd is not displaying so I'm not overriding it correctly.
Please can you advise how I should implement this functionality correctly?
Thanks