mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-24 07:55:35 +00:00
Initial commit
This commit is contained in:
21
src/Gloudemans/Shoppingcart/ShoppingcartServiceProvider.php
Normal file
21
src/Gloudemans/Shoppingcart/ShoppingcartServiceProvider.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php namespace Gloudemans\Shoppingcart;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ShoppingcartServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
|
||||
$this->app['cart'] = $this->app->share(function($app)
|
||||
{
|
||||
$session = $this->app['session'];
|
||||
return new Cart($session);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user