Changement image par file

This commit is contained in:
Cassandre Cantet 2017-10-04 15:24:51 +02:00
parent 670ee0e516
commit ece421c39c
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class ImagesController extends BaseController
'image' => 'required|file|image' 'image' => 'required|file|image'
]); ]);
$image = new Image(['content' => $request->input('image')]); $image = new Image(['content' => $request->file('image')]);
$image->save(); $image->save();
return response()->json($image); return response()->json($image);