Closed MehediDracula closed 5 years ago
Support for multiple folder has been added.
Thanks for this
another thing i would like to suggest. since on laravel we can add namespaced views like below. it will be also a good idea to add support for namespaced views
View::addNamespace('theme', '/path/to/themes/views');
return view('theme::view.name');
Ah but this may depend on where the namespace definition, I will try to achieve this function, thanks
@codingyu it is possible for now to add this functionality ? so it works with the vendor views too
so calling Abc::x
would open views/vendor/Abc/x.blade.php
@codingyu since vscode has per workspace based settings maybe this extension can leverage that. maybe we can define settings in workspace settings file like below
{
"theme": "/path/to/themes/views"
}
@ctf0 @MehediDracula
Do you like this way?
that looks amazing :fire: :fire:
@codingyu many thanx for the awesome job, but one question, does the settings image means that the user have to pre populate all the possible paths beforehand for the package to work correctly ?
if so then it defines the purpose, cuz this should be done internally ex.
::
if so then get the first word b4 the ::
and search under views/vendor/the-first-word
views/
excluding the vendor
directory this way you dont need to make any changes for each project you work on, and the path resolving stays dynamic all the time
@ctf0 I don't think it would be ideal as your views can be anywhere. if this extension only searches on resources/views
folder then it can't be configured.
currently, I'm working on a modular project where each module's view is under Modules/{ModuleName}/Resources/views
folder. so, I think using settings is flexible here.
@MehediDracula your example is not the default for the most, however to keep it flexible the resources/views
could be the default for the settings, unless you added an extra path like yours
@ctf0 Thank you for your advice. The next version will try this function. ☺️
First of all, this extension is awesome
I would like to suggest you something. one of in my project i have multiple views root folder. This extension is not working there as it's only searching inside laravel's default 'resources/views' folder.
it would be great if i can add an array of locations in settings.