php - Adding in code snippets/partials on a page -


how include snippets, or partials in pages in laravel 5? in node/angular, it's quite easy load different modules , such on page.

for example, on home page, i'm looping through data:

<h1>home</h1>  @if (count($practice))     <ul>         @foreach($practice $val)             <li>{{ $val }}</li>         @endforeach     </ul> @endif 

enter image description here


if include login snippet on page, covers rest of data:

<h1>home</h1>  @if (count($practice))     <ul>         @foreach($practice $val)             <li>{{ $val }}</li>         @endforeach     </ul> @endif  @include('auth.login') 

enter image description here

try include in new row :

<h1>home</h1>  @if (count($practice)) <div class="row">     <div class="col-md-12">     <ul>         @foreach($practice $val)             <li>{{ $val }}</li>         @endforeach     </ul>     </div> </div> @endif <div class="row">     <div class="col-md-12">         @include('auth.login')     </div> </div> 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -