laravel / ideas

Issues board used for Laravel internals discussions.
938 stars 31 forks source link

Tell us where did the laravel search for the view and couldn't find it #2633

Open Nefcanto opened 3 years ago

Nefcanto commented 3 years ago

I'm developing a package and I have a Mailable that sends a markdown template.

To test it, I used a Route to return an instance of the Mailable, as the documentation says.

However, I receive View [x] not found error.

I have checked everything and the debugging process is very frustrating. Especially that I'm developing a package and many factors are in play.

ASP.NET Core has a good feature that basically tells you:

Hey, I couldn't find this view. By the way, I searched these locations for it.

That second part, which is an array of the folders it searched for, would be of huge benefit in debugging.

Please add this functionality to laravel.

Thank you so much

ahinkle commented 3 years ago

The error is pretty explicit and helpful. Laravel does not search other locations for your view.

View some-new-email.blade.php not found is saying that it's unable to find that file within your application views directory.

Personally, me reading that would immediately go to the views folder and see what's going on.