-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
98 additions
and
0 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,26 @@ | ||
{ | ||
"name": "menarasolutions/geographer-laravel", | ||
"type": "library", | ||
"description": "Geographer integration classes for Laravel and Lumen", | ||
"keywords": ["laravel","geographer","geolocation","localization"], | ||
"homepage": "https://github.com/MenaraSolutions/geographer-laravel", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Denis Mysenko", | ||
"email": "[email protected]", | ||
"homepage": "https://www.menara.com.au" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.5.0" | ||
}, | ||
"require-dev": { | ||
"illuminate/support": "5.*" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"MenaraSolutions\\Geographer\\Integrations\\": "src/" | ||
} | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace MenaraSolutions\Geographer\Integrations; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
/** | ||
* Class LaravelFacade | ||
* @package Dusterio\LinkPreview\Integrations | ||
* @codeCoverageIgnore | ||
*/ | ||
class LaravelFacade extends Facade | ||
{ | ||
/** | ||
* Name of the binding in the IoC container | ||
* | ||
* @return string | ||
*/ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return 'geographer'; | ||
} | ||
} |
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,49 @@ | ||
<?php | ||
|
||
namespace MenaraSolutions\Geographer\Integrations; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
use MenaraSolutions\Geographer\Earth; | ||
|
||
/** | ||
* Class LaravelServiceProvider | ||
* @package Dusterio\LinkPreview\Integrations | ||
* @codeCoverageIgnore | ||
*/ | ||
class LaravelServiceProvider extends ServiceProvider | ||
{ | ||
/** | ||
* Indicates if loading of the provider is deferred. | ||
* | ||
* @var bool | ||
*/ | ||
protected $defer = true; | ||
/** | ||
* Bootstrap the application events. | ||
* | ||
* @return void | ||
*/ | ||
public function boot() | ||
{ | ||
} | ||
/** | ||
* Register the service provider. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
$this->app->singleton('geographer', function() { | ||
return new Earth(); | ||
}); | ||
} | ||
/** | ||
* Get the services provided by the provider. | ||
* | ||
* @return array | ||
*/ | ||
public function provides() | ||
{ | ||
return ['geographer']; | ||
} | ||
} |