Skip to content

Commit

Permalink
Fixed loader
Browse files Browse the repository at this point in the history
  • Loading branch information
eusonlito committed Feb 16, 2015
1 parent 44b3964 commit 397d014
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 25 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Begin by installing this package through Composer.

'aliases' => [
'...',
'Meta' => 'Laravel\Meta\Facades\Meta',
'Meta' => 'Laravel\Meta\Facade',
];
```

Expand All @@ -43,7 +43,7 @@ Now you have a ```Meta``` facade available.
Publish the config file:

```
php artisan config:publish laravel/meta
php artisan vendor:publish
```

#### app/Http/Controllers/homeController.php
Expand Down
4 changes: 1 addition & 3 deletions src/Laravel/Meta/Facade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php namespace Laravel\Meta;

use Illuminate\Support\Facades\Facade;

class Meta extends Facade
class Facade extends \Illuminate\Support\Facades\Facade
{
/**
* Name of the binding in the IoC container
Expand Down
3 changes: 1 addition & 2 deletions src/Laravel/Meta/Meta.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
namespace Laravel\Meta;
<?php namespace Laravel\Meta;

class Meta
{
Expand Down
23 changes: 5 additions & 18 deletions src/Laravel/Meta/MetaServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php namespace Laravel\Meta;

use Config;
use Illuminate\Support\ServiceProvider;

class MetaServiceProvider extends ServiceProvider
class MetaServiceProvider extends \Illuminate\Support\ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
Expand All @@ -20,8 +19,8 @@ class MetaServiceProvider extends ServiceProvider
public function boot()
{
$this->publishes([
__DIR__.'/../../config/config.php' => config_path('meta.php'),
], 'config');
__DIR__.'/../../config/config.php' => config_path('meta.php')
]);
}

/**
Expand All @@ -31,8 +30,8 @@ public function boot()
*/
public function register()
{
$this->app['mutlucell'] = $this->app->share(function($app) {
return new Meta($this->config());
$this->app['meta'] = $this->app->share(function($app) {
return new Meta(Config::get('meta'));
});
}

Expand All @@ -45,16 +44,4 @@ public function provides()
{
return ['meta'];
}

/**
* Get the base settings from config file
*
* @return array
*/
public function config()
{
Config::get('meta::config');

return Config::getItems()['meta::config'];
}
}

0 comments on commit 397d014

Please sign in to comment.