Sometimes, we require to generate random string for token or something other login in laravel 5 application. if i remember exactly, 1 year ago i was working on my laravel 5 application at that moment i need to create unique string.
I search on google and laravel docs i found str_random() helper of php laravel framework to generate random string, we need to just give then number as argument and it returns automatic random string. So you can also simply use bellow function, i added syntax and example bellow:
$randomString = str_random(25);
I hope you found your best....
Do you like below Tutorials ?
- Disable Back Button in Browser using JQuery
- Angular 9 CRUD for Beginners Step by Step Example
- Angular 8 CRUD Application Example
- How to Get Selected Checkbox Value in JQuery?
- How to Disable Mouse Right Click Cut Copy and Paste using JQuery?
- Codeigniter Create Custom Library Example
- Codeigniter Crop Image Before Upload Example
- React Install Bootstrap 4 Example