PHP Classes

File: example/index.php

Recommend this page to a friend!
  Classes of Roman Kozin   PHP Random User Generator   example/index.php   Download  
File: example/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Random User Generator
Generate random data for users from randomuser.me
Author: By
Last change:
Date: 5 years ago
Size: 354 bytes
 

Contents

Class file image Download
<?php

use KielD01\RandomUser\RandomUser;

require_once(
'../vendor/autoload.php');

try {
   
$randomUser = new RandomUser('1.1');

   
$randomUser
       
->setNationalityOnly('us', true)
        ->
setResultsCount(50)
        ->
fetch()
        ->
getResults();

   
dd($randomUser);

} catch (
Exception $e) {
    echo
"<pre>{$e->getMessage()}</pre>";
}