mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Fixes #2399
This commit is contained in:
parent
06021d79c1
commit
04e9ca0942
|
@ -55,7 +55,7 @@ class ProfileController extends Controller
|
||||||
|
|
||||||
if (Input::file('avatar')) {
|
if (Input::file('avatar')) {
|
||||||
$image = 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);
|
$path = public_path('uploads/avatars/'.$file_name);
|
||||||
Image::make($image->getRealPath())->resize(84, 84)->save($path);
|
Image::make($image->getRealPath())->resize(84, 84)->save($path);
|
||||||
$user->avatar = $file_name;
|
$user->avatar = $file_name;
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
<label class="col-md-3 control-label" for="avatar_delete">{{ trans('general.avatar_delete') }}</label>
|
<label class="col-md-3 control-label" for="avatar_delete">{{ trans('general.avatar_delete') }}</label>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
{{ Form::checkbox('avatar_delete') }}
|
{{ 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>') !!}
|
{!! $errors->first('avatar_delete', '<span class="alert-msg">:message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue