chuckc's avatar

File upload move(): Can't access returned Object properties

Hello guys, I have an issue with moving a simple file upload:

  • When I upload a file, everything goes right.
  • When I move the file with move(), everything goes right too.
  • However, when I try to access a property of the returned object, it doesn't work... Yet when I dd() the returned object, everything seems to be there: http://take.ms/MkEU5
$movedImage = $request->file('image')->move('admin/uploads/slides/', str_random(30) . '.' . $image->getClientOriginalExtension());
dd($movedImage); // works, and I can see the filename property
dd($movedImage->filename); // don't work

Maybe it's the normal behavior... If it is, I'd like to know why ? And how can I access the properties ?

Thanks!

0 likes
1 reply

Please or to participate in this conversation.