Skip to content

v4.1.13 - Fix view:cache failure when vendor views are not published

Latest

Choose a tag to compare

@PavlosIsaris PavlosIsaris released this 07 Apr 10:31
· 4 commits to main since this release

What's Changed

Fixed a DirectoryNotFoundException thrown by php artisan view:cache when the package's vendor views had not been published.

The service provider now only registers the published views path if it actually exists, falling back to the bundled package views otherwise. This mirrors the same is_dir() guard pattern already used for translation path registration.

Affected command: php artisan view:cache
Root cause: loadViewsFrom() was always passing the published vendor views directory to Laravel's view finder, even when that directory didn't exist (i.e. before running vendor:publish).