plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Bug]: Using custom views namespace for Modules in App/Modules doesnt resolve jump to view.

Open dyanakiev opened this issue 3 years ago • 4 comments

Bug description

Hello,

Im using custom view namespaces for each of my modules and i would love the click jump to view to work.

I have already enabled Simple directory modules but it doesnt help.

Im loading my custom namespaces in the boot method of a service provider like this:

$this->loadViewsFrom(module_path('Admin/Views'), 'admin');

Then in blade i use it like this

@extends('admin::part.empty')

But when i click on the admin::part.empty it says: cant find declaration.

Plugin version

4.4.5.213

Operating system

MacOS

dyanakiev avatar Dec 26 '21 12:12 dyanakiev

CleanShot 2021-12-30 at 00 30 34 Im uploading another preview of the issue in the controller.

I also noticed the same issue with loadTranslationsFrom.

dyanakiev avatar Dec 29 '21 22:12 dyanakiev

I can’t calculate module-path function result here... I still think how to do it... for one package it works one way. For another - another way...

adelf avatar Dec 29 '21 23:12 adelf

For now, you can try to use base_path function instead of module_path. If you doesn't have a lot of modules it might be a good workaround. I'll try to fix a module_path issue.

adelf avatar Dec 30 '21 16:12 adelf

@adelf oh awesome solution i dont have problem using that for now! Using base_path solves the issue for views, but not for translations.

Happy New Year! 2022 (soon)

dyanakiev avatar Dec 30 '21 18:12 dyanakiev