Level 1
I have the same issue. Have you found a solution?
I try to test a Api with upload files .
use Illuminate\Http\UploadedFile;
$response = $this->actingAs(Admin::find(1))->json('post', '/product', [
'title' => 'product title',
'images' => [
new UploadedFile(__DIR__ . '/img/gcu.jpg', 'gcu.jpg', 'image/png', filesize(__DIR__ . '/img/gcu.jpg'), null, true),
new UploadedFile(__DIR__ . '/img/head.jpg', 'head.jpg', 'image/png', filesize(__DIR__ . '/img/head.jpg'), null, true)
]
]);
And I got null in my controller throught $request->file('images')
And I also try ‘images[] => []’ too , didn't work
Please or to participate in this conversation.