if($validator->passes()){
$image = Input::file('image');
$title = Input::get('title');
var_dump($image->getRealPath());
$fileName = $image->getClientOriginalName();
$path3 = public_path().'/public/img/'. $fileName;
var_dump($fileName);
/*
Below I'm dumping/printing the path. Everything seems to be fine.
*/
var_dump($path3).'<br>';
print_r($path3).'<br>';
/*
Testing to see if path is writable. On the first image upload, it's not writable (because "img" does not exist)
*/
if(is_writable($path3)){
echo '<br>'."It's writable".'<br>';
} else {
echo '<br>'."It's not writeable".'<br>';
}
/*
Testing to see if makeDirectory has been made. makeDirectory returns a boolean. If makeDirectory is larger than 1, the the directory has been made
*/
File::makeDirectory($path3, $mode = 0777, true, true);
if (File::exists($path3) > 0){
echo '<br>'.'It exists'.'<br>';
} else {
echo '<br>'.'It does not exist'.'<br>';
}
/*
Testing to see if the path is writable. The answer is yes. Why? because the directory above has been made.
*/
if(is_writable($path3)){
echo '<br>'."It's writable".'<br>';
} else {
echo '<br>'."It's not writeable".'<br>';
}
die();
More code........