if (Input::file('image')) { if(file_exists(Input::file('image')->move(getcwd() . '/files/img/' . $post- >image))) { unlink(Input::file('image')->move(getcwd() . '/files/img/' . $post- >image)); .... }