MissingView
Emitted when view() or Factory::make() (e.g., view()->make()) references a Blade template that does not exist on disk. Facade calls like View::make() are not currently detected (see #591).
Why this is a problem
If the referenced view file doesn’t exist, Laravel throws an InvalidArgumentException at runtime. This check catches typos and missing templates during static analysis.
Examples
// Bad — typo in the view name
view('emails.welcom'); // MissingView
// Good — the view file exists
view('emails.welcome');
// Bad — referencing a deleted template
view('admin.old-dashboard'); // MissingView
// Good
view('admin.dashboard');
How to fix
- Check that the Blade file exists at the expected path (e.g.,
resources/views/emails/welcome.blade.php) - Fix any typos in the view name
- If the view is provided by a package, use the namespaced syntax (e.g.,
view('package::view.name')) — namespaced views are not checked by this rule
Configuration
This check is disabled by default. Enable it in your psalm.xml:
<plugins>
<pluginClass class="Psalm\LaravelPlugin\Plugin">
<findMissingViews value="true" />
</pluginClass>
</plugins>
Limitations
- Only string literal view names are checked — dynamic or concatenated names are skipped
- Namespaced views (e.g.,
mail::html.header) are skipped - Only
.blade.phpand.phpextensions are checked - Only view paths known at boot time are searched (
config('view.paths')plus paths added by service providers)