Skip to content

Commit

Permalink
+ Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dusterio committed Oct 2, 2016
1 parent ea6c079 commit 7a9d1e1
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
26 changes: 26 additions & 0 deletions composer.json
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/"
}
}
}
23 changes: 23 additions & 0 deletions src/LaravelFacade.php
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';
}
}
49 changes: 49 additions & 0 deletions src/LaravelServiceProvider.php
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'];
}
}

0 comments on commit 7a9d1e1

Please sign in to comment.