laravel generate unique db token

Solutions on MaxInterview for laravel generate unique db token by the best coders in the world

showing results for - "laravel generate unique db token"
Jorge
28 Apr 2018
1use Illuminate\Support\Str;
2
3public function yourFunction(){
4 $var = Str::random(32);
5
6 dd($var);
7}
Jerónimo
03 Jun 2020
1do {
2    $token_id = makeRandomToken();
3    $token_key = makeRandomTokenKey();
4} while (User::where("token_id", "=", $token_id)->where("token_key", "=", $token_key)->first() instanceof User);