This commit is contained in:
snipe 2016-08-30 12:34:23 -07:00
parent 06021d79c1
commit 04e9ca0942
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -88,7 +88,7 @@
<label class="col-md-3 control-label" for="avatar_delete">{{ trans('general.avatar_delete') }}</label>
<div class="col-md-5">
{{ Form::checkbox('avatar_delete') }}
<img src="/uploads/avatars/{{ $user->avatar }}" class="avatar img-circle">
<img src="{{ config('app.url') }}/uploads/avatars/{{ $user->avatar }}" class="avatar img-circle">
{!! $errors->first('avatar_delete', '<span class="alert-msg">:message</span>') !!}
</div>
</div>