Created
August 15, 2020 06:09
-
-
Save amitavroy/58e8649e40e70ad0e332a8d1eac5c4c7 to your computer and use it in GitHub Desktop.
Get a lot of Time Entries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var \Illuminate\Database\Eloquent\Factory $factory */ | |
use App\TimeEntry; | |
use Faker\Generator as Faker; | |
$factory->define(TimeEntry::class, function (Faker $faker) { | |
$username = [ | |
'Amitav', | |
'Jhon', | |
'Michael', | |
'James', | |
'Robert', | |
'William', | |
'David', | |
'Thomas', | |
'Christopher', | |
'Matthew', | |
'Donald', | |
'Andrew', | |
'Edward', | |
'Jason', | |
]; | |
$project = ['Youtube', 'Google Play', 'Vuejs', 'Twitter', 'MySQL Package', 'JSAlbum', 'Website']; | |
return [ | |
'username' => $faker->randomElement($username), | |
'project' => $faker->randomElement($project), | |
'date' => $faker->dateTimeBetween('-6 months', 'now'), | |
'time' => rand(1, 8), | |
]; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment