Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagolascasas committed Apr 25, 2018
1 parent 4cf32a7 commit df51b57
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ public function editUser(Request $request, $id)
DB::update('update users set idCountry = ? where id = ?', [$input['idcountry'],$id]);
if($input['phone']!==NULL)
DB::update('update users set phone = ? where id = ?', [$input['phone'],$id]);

/*
$image = DB::table('image')->where('iduser', $id)->pluck('source')[0];
if ($image == NULL)
$image = "default.jpg";
$image = "default.png";*/

return redirect()->route('profile', ['id' => Auth::user()->id, 'image' => $image]);
return redirect()->route('profile', ['id' => Auth::user()->id]);
}
}
Binary file added public/avatars/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/avatars/fellowship.jpg
Binary file not shown.
Binary file removed public/avatars/return.jpg
Binary file not shown.
Binary file removed public/avatars/two_towers.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion resources/views/pages/profileNotOwner.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<hr id="hr_space" class="mt-2">
<div class="row">
<div class="col-lg-2 col-sm-6 text-center mb-4">
<img class="img-fluid d-block mx-auto" src="{{asset('avatars/'.$image)}}" alt="{{$user->name}} photo">
<img class="img-fluid d-block mx-auto" src="{{asset('avatars/default.png')}}" alt="{{$user->name}} photo">
</div>
<table class="table table-striped col-lg-4">
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/pages/profileOwner.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<hr id="hr_space" class="mt-2">
<div class="row">
<div class="col-lg-2 col-sm-6 text-center mb-4">
<img class="img-fluid d-block mx-auto" src="{{asset('avatars/'.$image)}}" alt="{{$user->name}} photo">
<img class="img-fluid d-block mx-auto" src="{{asset('avatars/default.png')}}" alt="{{$user->name}} photo">
</div>
<table class="table table-striped col-lg-4">
<tbody>
Expand Down

0 comments on commit df51b57

Please sign in to comment.