I want to fake the upload of multiple types. It works for images, but I have a hard time finding out how to simulate other types of files.
Any not-image file gets
inode/x-empty for mimetype, where I would like to see
// Mimetype ok $file = \Illuminate\Http\UploadedFile::fake()->image('test.jpg'); // Mimetype issue: inode/x-empty $file = \Illuminate\Http\UploadedFile::fake()->create('test.pdf'); // also tried this $file->mimeType = 'application/pdf';
Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.