Support the ongoing development of Laravel.io →
posted 8 years ago
Security
Last updated 2 years ago.
0

You can use a GUID/UUID, its a hash that is bound to a user. Dont use it for relations but i.e.:

$user = User::where('guid', $guid)->firstOrFail();

Or

$user = User::where('guid', $guid)->first();

if(is_null($user)){ throw new Exception('User not found!'); }

0

Sign in to participate in this thread!

Eventy

Your banner here too?

khanAqib khanaqib Joined 14 Mar 2016

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.