How to Check if a View Exists in Laravel

May 13th, 2025 • 1 minute read time

If you're dealing with views in Laravel directly and need to check if a view exists beforehand, here how.

It's super simple! Just use the exists method on the View class. Here, I'm doing this via the view helper.

if (view()->exists('some.view')) {
    //...
}

Bear in mind that some.view means /some/view.blade.php. This method works the same with dot notation as you'd use when rendering views.

If you found this article helpful, you'll love our practical screencasts.
Author
Alex Garrett-Smith
Share :

Comments

No comments, yet. Be the first!

Tagged under