How to check if View Exists or not in Laravel 5?

By Hardik Savani | April 12, 2016 | | 1462 Viewer | Category : Laravel


In some situations, we require to check if view exists then render view otherwise display something else. But you can perform this task using "exists" function of view helper. It will return true or false. So you can use bellow example.

Example:

if (view()->exists('users.index')) {

....

}