Laravel Blade Include File Exmaple

Laravel 8 , Laravel 7 , Laravel , Laravel 6

Nicesnippets

900

22-01-2021


Hi Guys,

In this blog, I will show you how to include file in laravel blade. We will talk about laravel blade include file example. I am going to learn you how to include file in blade in laravel application. We will show How to include blade tempate in another file?. Let see example of How to include a view.blade.php file in Laravel

Blade's @include directive allows you to include a Blade view from within another view. All variables that are available to the parent view will be made available to the included view.

Example


<!DOCTYPE html>

<html>

<head>

<title>Laravel Blade Include File Example - NiceSnippets.com</title>

</head>

<body>

@include('example.index')

</body>

</html>

Include File

resources/views/example/index.blade.php

<h1>This is include file example</h1>

It will help you....


Recommended Posts