mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-24 07:55:35 +00:00
16
src/Facades/Cart.php
Normal file
16
src/Facades/Cart.php
Normal 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';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,6 +14,8 @@ class ShoppingcartServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
|
$this->app->bind('cart', 'Gloudemans\Shoppingcart\Cart');
|
||||||
|
|
||||||
$config = __DIR__ . '/../config/cart.php';
|
$config = __DIR__ . '/../config/cart.php';
|
||||||
$this->mergeConfigFrom($config, 'cart');
|
$this->mergeConfigFrom($config, 'cart');
|
||||||
|
|
||||||
@@ -26,4 +28,4 @@ class ShoppingcartServiceProvider extends ServiceProvider
|
|||||||
], 'migrations');
|
], 'migrations');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user