laravel blade if view exists
if(view()->exists($view)){
return view($view)->render();
}
return "Another View";
An Easy way to check if a laravel blade view exists. Simply use the:
view()->exists($view)
function and you will get a boolean value back if the view exists or does not exist 😉.
No explanation generated yet.