This commit is contained in:
snipe 2016-05-24 09:46:43 -07:00
parent 64d818e56e
commit 6c6e65b8ca

View file

@ -110,10 +110,10 @@ class AssetModelsController extends Controller
$image = Input::file('image');
$file_name = str_random(25).".".$image->getClientOriginalExtension();
$path = public_path('uploads/models/'.$file_name);
// Image::make($image->getRealPath())->resize(300, null, function ($constraint) {
// $constraint->aspectRatio();
// $constraint->upsize();
// })->save($path);
Image::make($image->getRealPath())->resize(300, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})->save($path);
$model->image = $file_name;
}