Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not reading vendor files inside views #794

Closed
poseso opened this issue Jul 15, 2019 · 8 comments

Comments

@poseso
Copy link

commented Jul 15, 2019

Hello, I am using Arcanedev Log viewer:
https://github.com/ARCANEDEV/LogViewer

The problem I'm facing is that it's not reading the view files i have under Modules\MyModule\Resources\views\vendor, it keeps reading the one from the package itself, I want to know if I need to do something to override the views from the package, so I can customize it?

Thank you

@nWidart

This comment has been minimized.

Copy link
Owner

commented Jul 19, 2019

You can check how modules views are loaded in the registerViews method of your module service provider.
There you can adjust based on your needs.

@poseso

This comment has been minimized.

Copy link
Author

commented Jul 19, 2019

When I php artisan publish:vendor, it creates a vendor folder under rootDirectory/resources/views/vendor/log-viewer which i can customize, but if I put that vendor folder inside Modules\MyModule\Resources\views\vendor any customization i make doesn't reflect in the view, it's like it doesn't exists, I can call any view inside my module and include it for ex: @include('core::includes.partials.messages') and works great, but its how to override packages vendors views inside my module?

@nWidart

This comment has been minimized.

Copy link
Owner

commented Jul 19, 2019

You can't do that, unless you own the package. Packages won't expect views to be in your modules folder.

@poseso

This comment has been minimized.

Copy link
Author

commented Jul 19, 2019

it's weird because then packages won't expect views to be either under root_folder/resources/views/vendor, if i delete the vendor folder from root_folder/resources/views/vendor it reads the one from root_folder/vendor/package, and if I copy it to root_folder/resources/views/vendor/package it can be customize, so I don't understand why it cannot be read from Modules\MyModule\Resources\views\vendor, if there is now way let me know so I can close this, and thank you for your quick response!

@nWidart

This comment has been minimized.

Copy link
Owner

commented Aug 19, 2019

I'm confused to what you want. You can use other package's views as always.

@poseso

This comment has been minimized.

Copy link
Author

commented Aug 19, 2019

I want to override packages views

@nWidart

This comment has been minimized.

Copy link
Owner

commented Aug 19, 2019

You can do that the way the packages document to do it.

@poseso

This comment has been minimized.

Copy link
Author

commented Aug 19, 2019

okay

@poseso poseso closed this Aug 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.