Package Data | |
---|---|
Maintainer Username: | Sukohi |
Maintainer Contact: | capilano.sukohi@gmail.com (Sukohi) |
Package Create Date: | 2017-06-09 |
Package Last Update: | 2017-06-09 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-20 15:00:12 |
Package Statistics | |
---|---|
Total Downloads: | 101 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
A Laravel package to generate fake data using celebrity data.
Execute the next command.
composer require sukohi/CelebrityFaker:1.*
Set the service providers in app.php
'providers' => [
...Others...,
Sukohi\CelebrityFaker\CelebrityFakerServiceProvider::class,
]
Also alias
'aliases' => [
...Others...,
'CelebrityFaker' => Sukohi\CelebrityFaker\Facades\CelebrityFaker::class,
]
Then execute the next commands.
php artisan vendor:publish
After run the above command you should have a config file called celebrity_faker.php
in your config folder.
You can set csv file path(s) there.
CSV files need to have key in first line like so.
| name | birthday | gender_id | ...
for($i = 0; $i < 100; $i++){
// Get celebrity randomly
$celebrity = \CelebrityFaker::getCelebrity();
// Each
echo $celebrity->name;
echo $celebrity->name_kana;
echo $celebrity->gender_id;
echo $celebrity->height;
echo $celebrity->weight;
echo $celebrity->blood_type;
echo $celebrity->prefecture;
echo $celebrity->company;
// Array
print_r($celebrity->toArray());
}
This package is licensed under the MIT License.
Copyright 2017 Sukohi Kuhoh