This is a basic php function – https://www.php.net/manual/en/function.rand.php
It gets a pseudo-random integer from 1 to 6, and if the random number is less than 5 the code is run.
More Related Contents:
- Laravel one to many relation with a one to one relation
- Laravel 5 – Remove Public from URL
- How to create custom helper functions in Laravel
- How to Set Variables in a Laravel Blade Template
- Composer update memory limit
- Doing HTTP requests FROM Laravel to an external API
- Laravel Multiple Pagination in one page
- requires ext-fileinfo. How do I add that into my composer.json file?
- Laravel 5.2 – Use a String as a Custom Primary Key for Eloquent Table becomes 0
- Uncaught ReflectionException: Class log does not exist Laravel 5.2
- Laravel 5.3 auth check in constructor returning false
- Composer killed while updating
- Laravel 4: how to “order by” using Eloquent ORM [duplicate]
- Laravel Advanced Wheres how to pass variable into function?
- How can I paginate a merged collection in Laravel 5?
- Laravel 4 removing public from URL
- ReflectionException: Class ClassName does not exist – Laravel
- Laravel 5.2 CORS, GET not working with preflight OPTIONS
- laravel model callbacks after save, before save, etc
- Laravel 5.1: keep uploaded file as old input
- How Can I Set the Default Value of a Timestamp Column to the Current Timestamp with Laravel Migrations?
- How to Make Laravel Eloquent “IN” Query?
- How to store and retrieve image contents from the database using Laravel
- Laravel Eloquent ORM Transactions
- Route [login] not defined
- Laravel Eloquent sort by relation table column
- My Laravel 5.2.10 Sessions wont persist
- How to install all required PHP extensions for Laravel?
- How to send data using redirect with Laravel
- Laravel Carbon Data Missing