Shop Provider Update

This commit is contained in:
devansh bawari 2021-03-16 10:33:42 +05:30
parent e9c1e0e0d4
commit dd5effeb2b
1 changed files with 16 additions and 16 deletions

View File

@ -2,13 +2,13 @@
namespace Webkul\Shop\Providers;
use Illuminate\Support\ServiceProvider;
use Webkul\Core\Tree;
use Illuminate\Routing\Router;
use Illuminate\Pagination\Paginator;
use Webkul\Shop\Http\Middleware\Locale;
use Webkul\Shop\Http\Middleware\Theme;
use Illuminate\Support\ServiceProvider;
use Webkul\Shop\Http\Middleware\Locale;
use Webkul\Shop\Http\Middleware\Currency;
use Webkul\Core\Tree;
class ShopServiceProvider extends ServiceProvider
{
@ -19,28 +19,28 @@ class ShopServiceProvider extends ServiceProvider
*/
public function boot(Router $router)
{
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'shop');
$this->publishes([__DIR__.'/../Resources/lang' => resource_path('lang/vendor/shop')]);
/* publishers */
$this->publishes([
__DIR__ . '/../../publishable/assets' => public_path('themes/default/assets'),
], 'public');
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'shop');
$this->publishes([
__DIR__ . '/../Resources/views' => resource_path('themes/shop/views'),
__DIR__ . '/../Resources/views' => resource_path('themes/default/views'),
__DIR__ . '/../Resources/lang' => resource_path('lang/vendor/shop'),
]);
/* loaders */
$this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'shop');
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'shop');
/* aliases */
$router->aliasMiddleware('locale', Locale::class);
$router->aliasMiddleware('theme', Theme::class);
$router->aliasMiddleware('currency', Currency::class);
/* view composers */
$this->composeView();
/* paginators */
Paginator::defaultView('shop::partials.pagination');
Paginator::defaultSimpleView('shop::partials.pagination');
}
@ -56,7 +56,7 @@ class ShopServiceProvider extends ServiceProvider
}
/**
* Bind the the data to the views
* Bind the the data to the views.
*
* @return void
*/