diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index a92c36db4d..4a176fe4c3 100755 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -55,7 +55,7 @@ class ProfileController extends Controller if (Input::file('avatar')) { $image = Input::file('avatar'); - $file_name = $user->first_name."-".$user->last_name.".".$image->getClientOriginalExtension(); + $file_name = str_slug($user->first_name."-".$user->last_name).".".$image->getClientOriginalExtension(); $path = public_path('uploads/avatars/'.$file_name); Image::make($image->getRealPath())->resize(84, 84)->save($path); $user->avatar = $file_name; diff --git a/resources/views/account/profile.blade.php b/resources/views/account/profile.blade.php index 05fed2ca4b..15d70732fe 100755 --- a/resources/views/account/profile.blade.php +++ b/resources/views/account/profile.blade.php @@ -88,7 +88,7 @@