Laravel Template Help!

2

I have two blade.php files and I can not see the content in the browser.

@extends('layouts.index')

   @section('content')
   @parent
     <div class="container">
         <div class="row">
             <div class="col-lg-12 text-center">
        <p>Copyright &copy; Your Blog 2016</p>
          </div>
        </div>
     </div>

    @stop

<footer>
      @yield('content')
</footer>
    
asked by anonymous 05.05.2016 / 15:55

1 answer

1

master.blade.php

<!DOCTYPE html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
    </head>
    <body>

        @yield('content')

    </body>
</html>

content.blade.php

@extends('layouts.master')

@section('content')
    <h1>Teste de Template</h1>   
@stop

You need to have a Controller and a Route.

You should already have a Model Controller, use it.

YourController.php

public function getIndex(){ 
   return view('frontend.pagina');
}

routes.php file

Route::controller("/", "SeuController");

Access:

  

link

    
05.05.2016 / 16:02