Merge pull request #148 from rakibabu/develop

Fixed facade binding
This commit is contained in:
Rob Gloudemans
2016-05-19 11:01:54 +02:00
2 changed files with 19 additions and 1 deletions

16
src/Facades/Cart.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
namespace Gloudemans\Shoppingcart\Facades;
use Illuminate\Support\Facades\Facade;
class Cart extends Facade {
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'cart';
}
}

View File

@@ -14,6 +14,8 @@ class ShoppingcartServiceProvider extends ServiceProvider
*/
public function register()
{
$this->app->bind('cart', 'Gloudemans\Shoppingcart\Cart');
$config = __DIR__ . '/../config/cart.php';
$this->mergeConfigFrom($config, 'cart');
@@ -26,4 +28,4 @@ class ShoppingcartServiceProvider extends ServiceProvider
], 'migrations');
}
}
}
}