Hello Devs, 

In this tutorial, we will learn Laravel Blade Include File If Exists.

you will know how to include a file if exists in the blade in the laravel application.

Follow this step by step guide below, 


Example:

<!DOCTYPE html>
<html>
<head>
    <title>Laravel Blade Include File if exists Example - rathorji.in</title>
</head>
<body>
    @includeIf('example.index', ['status' => 'Include file successfully'])
</body>
</html>


Include File:

resources/views/example/index.blade.php

<h1>{{ $status }}</h1>

May this example help you.