-
-
Save allanfreitas/497ad1ae2ecef6f41c49 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // controller Ola , | |
| <?php | |
| class OlaController extends BaseController { | |
| public function showProfile() | |
| { | |
| // | |
| return View::make('ola'); | |
| } | |
| } | |
| // a raiz ola | |
| @extends('layout.master') | |
| @section('content') | |
| <h1>Meu teste 2</h1> | |
| @stop | |
| // o layout | |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Meu teste no laravel</title> | |
| </head> | |
| @include('layout.header') | |
| @yield ('content') | |
| <body> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // controller Ola , | |
| <?php | |
| class OlaController extends BaseController { | |
| protected $layout = 'layout.master'; | |
| public function showProfile() | |
| { | |
| $this->layout->content = View::make('ola'); | |
| } | |
| } | |
| //ola.blade.php | |
| <h1>Meu teste 2</h1> | |
| //layout/master.blade.php | |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Meu teste no laravel</title> | |
| </head> | |
| @include('layout.header') | |
| {{$content)}} | |
| <body> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment