-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated ip handler interface, added default implementation
- Loading branch information
Soban Mahmod
committed
Jul 7, 2022
1 parent
4288457
commit 6338fbe
Showing
2 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace ipinfo\ipinfolaravel\iphandler; | ||
|
||
/** | ||
* Default implementation of the IPHandlerInterface. Selects default ip from request. | ||
*/ | ||
class DefaultIPHandler implements IPHandlerInterface | ||
{ | ||
|
||
/** | ||
* Selectes default IP address from request. | ||
* @param \Illuminate\Http\Request $request | ||
* @return string IP address. | ||
*/ | ||
public function getIP($request) | ||
{ | ||
return $request->ip(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters