Skip to content

Commit

Permalink
Default foto jika null
Browse files Browse the repository at this point in the history
  • Loading branch information
andifahruddinakas committed May 31, 2022
1 parent 45ad233 commit 974e029
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helpers/general_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ function is_user($url = null, $sex = 1)

function avatar($foto)
{
$foto = 'storage/user/' . $foto;
if ($foto) {
$foto = 'storage/user/' . $foto;
}

$default = 'bower_components/admin-lte/dist/img/user2-160x160.jpg';

return is_img($foto, $default);
Expand Down

0 comments on commit 974e029

Please sign in to comment.