Skip to content

Commit

Permalink
access using helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
khanzadimahdi committed Oct 14, 2019
1 parent 11997cf commit a81233b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
"autoload": {
"psr-4": {
"Shetabit\\Visitor\\": "src"
}
},
"files": [
"src/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
Expand Down
12 changes: 12 additions & 0 deletions src/helpers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
if (!function_exists('visitor')) {
/**
* Access visitor through helper.
*
* @return \Shetabit\Visitor\Visitor
*/
function visitor()
{
return app('shetabit-visitor');
}
}

0 comments on commit a81233b

Please sign in to comment.