Please tell me the best way how can customization admin and shop controller and route?
-
Please tell me the best way how can customization admin and shop controller and route?
-
Hi @zainawan99
You can customise controller by modifying code according to you in the respected file but this modifications will be removed if you update bagisto in future.
The best way add any custom functionality is by package creation. You can learn package development through our documentation:
https://devdocs.bagisto.com/1.x/packages/Thanks!
-
@vishalK hi
same as model, view, migrations and all other functionality create a new package? -
Hi @zainawan99
Model, view, migration, etc... are the parts of packages you can easily implement any kind of functionality using these. Packages work as an extension or plugin in Bagisto.
Thanks! -
@vishalK but my question, I m override a model view, migration without package
second, create a new package then override all functionality -
Hi @zainawan99
Both ways are valid, but if you override without creating package than all your custom code will be removed whenever you update Bagisto and if you create package than all your code is safe inside your package only need to check the compatibility issues on update.We suggest you to go with the package creation method.
Thanks ! -
@vishalK last thing I m shop and admin theme override. (resources\views\vendor\admin) admin theme and (resources\views\vendor\custom-theme) shop theme this way view override best or not
same as style and javascript (public/admin/assets/) admin theme assets and (public/custom-theme/assets/) shop theme -
Hi @zainawan99
Yes, you can override both admin theme and shop theme using this way and this is also the best way and if you want to create a new theme kindly go through our documentation:
https://devdocs.bagisto.com/1.x/themes/Thanks!