Updated 18 June 2026
Earlier, view files were copied into the resources directory and directly modified to customize the UI by overriding package views locally.
|
1 2 3 4 |
$this->publishes([ __DIR__.'/../Resources/views/shop/default/checkout/cart/index.blade.php' => resource_path('views/vendor/shop/checkout/cart/index.blade.php'), ]); |
After publishing, developers edited and copied files to customize storefront and admin panel layouts without changing package code.
Instead of copying files, register your custom view path using prependNamespace().
|
1 |
$this->app['view']->prependNamespace( 'shop', __DIR__.'/../Resources/views/shop/default' ); |
|
1 |
$this->app['view']->prependNamespace( 'admin', __DIR__.'/../Resources/views/admin/default' ); |
Suppose Bagisto loads the following view:
|
1 |
view('shop::checkout.cart.index'); |
Laravel will first check:
|
1 |
packages/Webkul/YourPackage/src/Resources/views/shop/default/checkout/cart/index.blade.php |
If the file exists, it will be used instead of the original Bagisto view.

prependNamespace() instead of manual file copying.If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.