How can I insert a view blade inside another view in blade engine in laravel
I am working in a project that's contains : home view ......"home.blade.php"
I want to add another page "home2.blade.php"
So finally I got 1 page which is "home.blade.php" but it contains "home2.blade.php"
this is the home2.blade.php
@extends('layouts.app')
@section('content')
<!-- All Posts -->
@if(count($posts) > 0)
<div class="panel panel-default">
<div class="panel-heading">
All Posts
</div>
<div class="panel-body">
<table class="table table-striped task-table">
<!-- Table Headings -->
<thead>
<th>Title</th>
<th>Content</th>
</thead>
<!-- Table Body -->
<tbody>
@foreach($posts as $post)
<tr>
<td class="table-text">
<div>{{$post->title}}</div>
</td>
<td class="table-text">
<div>{{$post->content}}</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endif
@endsection
and this is "home.blade.php"
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body data-spy="scroll" data-offset="0" data-target="#navigation">
<!-- Fixed navbar -->
<div id="navigation" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse"
data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
@include
- kellymandem