mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 07:31:31 +00:00
Mod test,
Document ServiceProvider,
This commit is contained in:
@@ -15,13 +15,19 @@ class ShoppingcartServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
/* Bind Cart class to cart for Facade usage */
|
||||
$this->app->bind('cart', 'Gloudemans\Shoppingcart\Cart');
|
||||
|
||||
/* Determine where the config file is located */
|
||||
$config = __DIR__.'/Config/cart.php';
|
||||
|
||||
/* Use local config */
|
||||
$this->mergeConfigFrom($config, 'cart');
|
||||
|
||||
$this->publishes([__DIR__.'/Config/cart.php' => config_path('cart.php')], 'config');
|
||||
/* Also allow publishing to overwrite local config */
|
||||
$this->publishes([$config => config_path('cart.php')], 'config');
|
||||
|
||||
/* Publish included migrations */
|
||||
$this->publishes([
|
||||
realpath(__DIR__.'/Database/migrations') => $this->app->databasePath().'/migrations',
|
||||
], 'migrations');
|
||||
|
||||
Reference in New Issue
Block a user