Laravel include Function

laravel contains a very big role of include function.Such as using php in the function is used to add another file.In the same way laravel use use include to add more than one file.

The syntex in which an include in laravel is written like this.

@include('filename')

Example:-

index.blade.php

<html>
<head>
<title>home page</title>
</head>
<body>
<h2>laravel include file use function</h2>
@include('myname')
</body>
</html>

myname.blade.php

<p>Rahul Chaurasiya</p>

Output:-

laravel include file use function

Rahul Chaurasiya