-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Bug description
Laravel Idea correctly detects missing view files and offers a “Create View” quick fix for standard Laravel view calls:
view('anyviewfile123');
In this case:
The IDE detects that the view does not exist
A warning is shown
A Create View quick-fix action is available
However, the same behavior does not work when using module-prefixed (namespaced) views.
When a view namespace is registered in a Service Provider:
$this->loadViewsFrom( base_path('Modules/Core/Resources/views'), 'core' );
And the view is called like this:
view('core::anyviewfile123');
Laravel Idea:
Does not check whether the view file exists
Shows no warning
Does not offer the Create View quick-fix
This happens even when the view file is physically missing.
🟢 Expected Behavior
Laravel Idea should:
Detect view namespaces registered via loadViewsFrom()
Validate module-prefixed views such as core::anyviewfile123
If the view does not exist:
Show a warning
Offer a Create View quick-fix
Expected file creation path:
Modules/Core/Resources/views/anyviewfile123.blade.php
🔁 Steps to Reproduce
Create a Laravel project
Add a module structure (e.g. Modules/Core/...)
Register a view namespace using loadViewsFrom(..., 'core')
Call a non-existing view:
view('core::nonExistingView');
Ensure the view file does not exist on disk
Observe that:
No warning is shown
No quick-fix is available
🧠 Additional Notes
This significantly affects DX in module-based architectures (NWIDART, custom modules, monorepos)
The issue occurs even when using Laravel’s native loadViewsFrom API
The same validation works correctly for non-namespaced views
🛠 Suggested Improvement
Parse loadViewsFrom() calls during static analysis
Register view namespace → directory mappings in the IDE index
Include namespace::view resolution in the existing view validation pipeline
Clarification: Autocomplete Works, but Missing Views Are Not Validated
Plugin version
12.0.0.253
Operating system
Windows
Steps to reproduce
reate a module and register its views with a custom prefix using:
$this->loadViewsFrom($modulePath . '/Resources/views', 'core');
Then try calling:
view('core::notexistyfile');
For notexistyfile, the IDE will not offer the “Create View” quick-fix option, even though the view file does not exist.