Answers for "create unique token laravel"

PHP
1

laravel generate unique token

use Illuminate\Support\Str;

public function yourFunction(){
 $var = Str::random(32);

 dd($var);
}
Posted by: Guest on February-19-2020
0

laravel generate unique db token

do {
    $token_id = makeRandomToken();
    $token_key = makeRandomTokenKey();
} while (User::where("token_id", "=", $token_id)->where("token_key", "=", $token_key)->first() instanceof User);
Posted by: Guest on September-23-2020

Code answers related to "create unique token laravel"

Browse Popular Code Answers by Language