Answers for "Laravel Generate Random Unique Number Example"

PHP
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

Code answers related to "Laravel Generate Random Unique Number Example"

Browse Popular Code Answers by Language