mardi 27 septembre 2016

Laravel yield and extends not working

This is master.blade.php placed in views folder

<html ng-app="planner">
<head>
    <title>MeetUp Planner</title>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/master.css" type="text/css">
</head>
<body ng-controller="MainController">
    <div class="container" ng-controller="MainController">
        <div class="row row-centered planner-block">
            <div class="col-md-12">
                <div class="col-md-5 col-centered col-min form-area">
                    <div class="row row-centered">
                        @yield('signup')
                    </div>
                </div>
            </div>
        </div>
    </div>
<script src="js/master.js"></script>
</body>
</html>

This is forms/signup.blade.php place in views folder

@extends('master')

@section('signup')
    <div class="col-md-11 col-centered form-area-inner">
        <span class="form-text">Sign Up</span>
        <hr class="seperator"/>
    </div>
@stop

This is routes file

<?php
Route::get('/', function () {
    return view('master');
});

The yield 'signup' is not wokring, the divs and text are not being show in the master file. What could be the problem?

Directory Structure

resources:
---views->errors
---views->forms->signup.blade.php
---views->vendor
---views->master.blade.php

Using laravel 5.2



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire