How to securely share a link to others - Laravel 5

Hi am making a Call Recording System, basically, there's admin and user. Admin will upload a call recording file which is stored in the file system. Then the admin will assign that a user a call recording which the user can see.

So in my database I have

RecordingsTable
->id
->Name
->Path
->FileName

then my Designation table which where I store the assigned call recording to a user.

DesignationTable
->id
->User_id
->Recording_id

I already make the function which the user can only see and play the recording assigned to him/her. My problem now is the user could also share that recording to someone else. I already done that, what I do is loading the the assigned recording to the user, and in his/her dashboard there's a public link for the video, say

If you use ID in the URL, then as you noticed it's easy to guess other possible IDs, change the URL and access other recordings. So what you need to do is to share links containing a value that users won't be able to guess. One example would be a hash of the recording ID using some secret value as a hash - e.g. your APP_KEY value.

What you need to do is:

Add a string hash column to your recording table

When recording is created, calculate the hash and save it with the recording:

This way your links will be publicly available, but guessing a hash of another recording will be more or less as hard as guessing passwords in your application as the same logic is applied. Just make sure you keep your APP_KEY safe.