Answers for "random number generator in laravel"

PHP
8

laravel Str::random

use Illuminate\Support\Str;

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

laravel get random number of data from database

Model::select('column')
    ->where('column','value')
    ->inRandomOrder()
    ->limit(2) // here is yours limit
    ->get();
Posted by: Guest on July-14-2021

Code answers related to "random number generator in laravel"

Browse Popular Code Answers by Language