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

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

Share this post:

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.


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