How to check if View Exists or not in Laravel?

By Hardik Savani September 5, 2020 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.


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



We are Recommending you