I'm uploading a file in laravel. The path is storing in database but unable to store image into destination folder.
Here is my controller.
public function post_contact()
{
$contact = new Contact;
$contact->name = Input::get('name');
$contact->email = Input::get('email');
$contact->mobile = Input::get('mobile');
$contact->password = Input::get('password');
$contact->confirm = Input::get('confirm');
if($contact->save())
{
$data = Input::except('_token');
$contact->upload = $data['upload'];
$time=time();
if(Input::hasFile('upload'))
{
$file = Input::file('upload');
$image=$time . '.' .$file->getClientOriginalName();
$file->move_uploaded_file(public_path().'../app/uploads', $image);
}
$contact->save();
}
return Redirect::route('contact')->with('success','Successfully Saved');
}