int $resizeWidth = null,
int $resizeHeight = null,
bool $keepRatio = true
- )
- {
+ ) {
$imageName = $uploadedFile->getClientOriginalName();
$imageData = file_get_contents($uploadedFile->getRealPath());
* @return string
* @throws ImageUploadException
*/
- protected function resizeImage(string $imageData, $width = 220, $height = null, $keepRatio = true)
+ protected function resizeImage(string $imageData, $width = 220, $height = null, bool $keepRatio = true)
{
try {
$thumb = $this->imageTool->make($imageData);
$image = $this->saveNewFromUrl($userAvatarUrl, 'user', $imageName);
$image->created_by = $user->id;
$image->updated_by = $user->id;
+ $image->uploaded_to = $user->id;
$image->save();
return $image;