Overide admin view using custom package?
-
Is it possible to override the views in admin, by a view file in custom package?
Dont know if its wierd but what i want to achieve is that when i add my custom package to any bagisto project some views on core packages also needs to be override. -
Yes. You can override any of view file.
You can read this one - https://forums.bagisto.com/topic/221/how-to-override-view-file-in-bagisto
So you need to create a view file (In your package & follow same path structure as core 's view file consist ) & publish this file according to path of that suggested in above topic or core's view file has, in your package's service provider. Like
$this->publishes([ __DIR__ . 'folder1/folder2/filename' => resource_path('views/vendor/shop/folder1/folder2/filename'), ]);
Thanks
-
Thanks ill try this.
-
hey can you give me an example? Replace folder1/folder2 with actual folder names. Thank you
-
You can see this one -
$this->publishes([ __DIR__ . '/../Resources/views/admin/catalog/products/edit.blade.php' => resource_path('views/vendor/admin/catalog/products/edit.blade.php'), ]);
We are overriding product's edit file.
Thanks
-
@rahul said in Overide admin view using custom package?:
Yes. You can override any of view file.
You can read this one - https://forums.bagisto.com/topic/221/how-to-override-view-file-in-bagisto cookie clicker
So you need to create a view file (In your package & follow same path structure as core 's view file consist ) & publish this file according to path of that suggested in above topic or core's view file has, in your package's service provider. Like
$this->publishes([ __DIR__ . 'folder1/folder2/filename' => resource_path('views/vendor/shop/folder1/folder2/filename'), ]);
Thanks
I greatly appreciate your response. It has great value.
-
Hi there,
Thanks for the update
Also if you like our support, you may give us the review here:- https://www.trustpilot.com/review/bagisto.com
That would be grateful for us. -
This post is deleted!