Answers for "unique str random laravel"

PHP
8

laravel Str::random

use Illuminate\Support\Str;

$random = Str::random(40);
Posted by: Guest on June-06-2020
0

Laravel Generate Random Unique Number Example

<?php
  
namespace App\Http\Controllers;
  
class TestController extends Controller
{
    /**
     * Write code on Method
     *
     * @return response()
     */
    public function index()
    {
        $randomNumber = random_int(1000, 9999);
  
        dd($randomNumber);
    }
}
Posted by: Guest on August-30-2021

Browse Popular Code Answers by Language