mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 07:31:31 +00:00
Large update for version 2.0
This commit is contained in:
29
src/ShoppingcartServiceProvider.php
Normal file
29
src/ShoppingcartServiceProvider.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Gloudemans\Shoppingcart;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ShoppingcartServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$config = __DIR__ . '/../config/cart.php';
|
||||
$this->mergeConfigFrom($config, 'cart');
|
||||
|
||||
if ( ! class_exists('CreateShoppingcartTable')) {
|
||||
// Publish the migration
|
||||
$timestamp = date('Y_m_d_His', time());
|
||||
|
||||
$this->publishes([
|
||||
__DIR__.'/../database/migrations/0000_00_00_000000_create_shoppingcart_table.php' => database_path('migrations/'.$timestamp.'_create_shoppingcart_table.php'),
|
||||
], 'migrations');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user