I host my laravel application in a seared hosting and i upload my laravel project into the root directory and i upload my public folder into the public_html directory .
i want to save image in avater_img
or assistant_img
or doctor_img
.
For thereby i write this code
$file = Input::file('photo');
if($file != ""){
$ext = $file->getClientOriginalName();
$file_name = rand(10000,50000).'.'. $ext;
$image = Image::make(Input::file('photo'));
$image->resize(300,300);
$image->save(public_path() . '/doctor_img/' . $file_name);
}
How can i fix this error