$file = Input::file('photo');
$filename = 'uploads/', time(). '-' . $file->getClientOriginalName();
$file = $file->move(public_path().'/'.$filename);
$post->photo = $filename;
Jan 22, 2015
6
Level 1
Public Path Upload image Issue
$file = Input::file('photo');
$file = $file->move(public_path().'/uploads/', time(). '-' . $file->getClientOriginalName());
$post->photo = $file->getRealPath();
Everything is working however its putting the full path into the database:
/var/www/domian.com/laravel/public/uploads/1421954572-photo.jpg
i need this: /uploads/1421954572-photo.jpg
thanks
Please or to participate in this conversation.