Skip to content

Instantly share code, notes, and snippets.

@bulfaitelo
Created April 29, 2017 19:00
Show Gist options
  • Save bulfaitelo/149f918d172ef40467db6314095f7d45 to your computer and use it in GitHub Desktop.
Save bulfaitelo/149f918d172ef40467db6314095f7d45 to your computer and use it in GitHub Desktop.
Tutorial Laravel para iniciantes - Parte 06 [Relacionando models com o Eloquent ORM, criando migrations e seeds]
<!DOCTYPE html>
<html>
<head>
<title>Bullfaitelo Form test</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div class=”container”>
<h1>Lista de mensagens</h1>
<hr />
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Nome</th>
<th>Email</th>
<th>Mensagem</th>
<th>Categoria</th>
</tr>
</thead>
<tbody>
@foreach($contatos as $row)
<tr>
<th scope="row">{{ $row->id }}</th>
<td>{{ $row->nome }}</td>
<td>{{ $row->email }}</td>
<td>{{ $row->mensagem }}</td>
<td>{{ $row->categoria->nome }}</td>
</tr>
@endforeach
</tbody>
</table>
<a target="_blank" href="http://www.bulfaitelo.com.br/2017/04/tutorial-laravel-para-iniciantes-parte03.html"> Tutorial Laravel para iniciantes - Parte 03 [Configuração e manipulação do MySQL] </a>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment