laravel generate random unique number example

Solutions on MaxInterview for laravel generate random unique number example by the best coders in the world

showing results for - "laravel generate random unique number example"
Julia
14 Feb 2019
1<?php
2  
3namespace App\Http\Controllers;
4  
5class TestController extends Controller
6{
7    /**
8     * Write code on Method
9     *
10     * @return response()
11     */
12    public function index()
13    {
14        $randomNumber = random_int(1000, 9999);
15  
16        dd($randomNumber);
17    }
18}