Because the first parameter of move() is the destination folder, not a full path name:
public function move($directory, $name = null)
Edit: Source is in /vendor/symfony/http-foundation/File/UploadedFile.php
When a new conference is created is stored and uploaded an image with the code below. But then in the frontend the image doesn't appears. And in the uploads folder instead of appears a jpg file it appears a folder with .jpg extension.
Do you know where is the issue?
if($request->image){
$featured = $request->image;
$featured_new_name = 'uploads/conferences/'.time().$featured->getClientOriginalName();
$featured->move($featured_new_name);
}
else{
$featured_new_name = '';
}
$conference = Conference::create([
'image' => $featured_new_name,
]);
Because the first parameter of move() is the destination folder, not a full path name:
public function move($directory, $name = null)
Edit: Source is in /vendor/symfony/http-foundation/File/UploadedFile.php
Please or to participate in this conversation.