Skip to content

Commit

Permalink
add helpers function: avatar()
Browse files Browse the repository at this point in the history
  • Loading branch information
uyab committed Jul 28, 2016
1 parent c931756 commit 35301e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"mockery/mockery": "0.9.*"
},
"autoload": {
"files": ["src/helpers.php"],
"psr-4": {
"Laravolt\\Avatar\\": "src"
}
Expand Down
8 changes: 8 additions & 0 deletions src/helpers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

if (!function_exists('avatar')) {
function avatar($subject)
{
return \Laravolt\Avatar\Avatar::create($subject)->toBase64();
}
}

0 comments on commit 35301e3

Please sign in to comment.