I am using Laravel 4.2 with the Intervention library,and I am not sure why I am getting this problem when everything else seems to be right. here is the code:
Route::post('test',function()
{
// check if files was sent
if(Input::hasFile('file'))
{
$image = Input::file('file');
$filename = date('Y-m-d-H:i:s').'-'.$image->getClientOriginalName();
$path = public_path('images/cars/'.$filename);
Image::make($image->getRealPath())->resize(468,249)->save($path);
} else {
return Response::json(array('test'=>false));
}
});
The error I am receiving is:
Intervention \ Image \ Exception \ NotWritableException Can't write image data to path (C:\xampp\htdocs\jacars_project\public/images/cars/2014-08-26-03:41:39-icon_2034.png).
Thanks in advance in helping me solve the problem