dimanche 20 août 2017

@yield, @section in Laravel

Hello everyone I want to load shopReq.blade.php file in master.blade.php and I am successful in doing this. But when I load modals.blade.php file in shopReq.blade.php it does not included. Am I doing something wrong here? Please help.

master.blade.php (in views/layouts):

<html>
   <body >
          @yield('content')
    </body>
</html>

shopReq.blade.php (in views)

@extends('layouts.master')
@section('content')
<h1>Hello I am in shopReq.blade.php
@yield(content)
@endsection

modals.blade.php (in views)

@extends('shopReq')
@section('content')
<h1>Hello I am in modals.blade.php
@endsection

web.php:

`Route::group(['middleware' =>['web']], function()
    {
    Route::get('/', function () {
        return view('welcome');
    })->name('home');
});`



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2vdF6Bf
via IFTTT

Aucun commentaire:

Enregistrer un commentaire