I want to create some files for my seedfile using fzaninotto/faker.
file($sourceDir = '/tmp', $targetDir = '/tmp') // '/path/to/targetDir/13b73edae8443990be1aa8f1a483bc27.jpg'
file($sourceDir, $targetDir, false) // '13b73edae8443990be1aa8f1a483bc27.jpg'
My seedfile for the files looks like this:
$factory('App\File', [
'order_id' => 'factory:App\Order',
'originalFilename' => $faker->file(public_path('files/uploads'), public_path('files/uploads/tmp'), false),
'filename' => $faker->randomNumber($nbDigits = NULL),
'filepath' => 'files/uploads'
]);
And I currently have a public folder structure that looks like this:
public
-files
-uploads
-tmp <- Here are some dummy files of mine that can be used by fzaninotto fakers dummy creation class
How do I structure my seedfile correctly, to be able to generate some dummy files?