Last active
May 1, 2017 19:41
-
-
Save bulfaitelo/fc008919349b6ef373cb6af18ce90046 to your computer and use it in GitHub Desktop.
Tutorial Laravel para iniciantes - Parte 07 [Criando uma Camada de autenticação]
This file contains 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
@extends('layouts.app') | |
@section('content') | |
<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> | |
@endsection |
This file contains 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
@extends('layouts.app') | |
@section('content') | |
<div class="container"> | |
<h1>Bullfaitelo Form test</h1> | |
<hr /> | |
@if (count($errors) > 0) | |
<div class="alert alert-danger"> | |
<ul> @foreach ($errors->all() as $error) | |
<li>{{ $error }}</li> | |
@endforeach </ul> | |
</div> | |
@endif | |
<form action="enviar" method="POST"> | |
<input type="hidden" name="_token" value="{{ csrf_token() }}"> | |
<!-- SELECT --> | |
<div class="form-group"> | |
<label for="nome">Categoria</label> | |
<select id="id_categoria" name="id_categoria" class="form-control"> | |
<option value="null">Selecione</option> | |
@foreach (App\Categoria::all() as $categoria) | |
<option value="{{ $categoria->id }}">{{ $categoria->nome }}</option> | |
@endforeach | |
</select> | |
</div> | |
<!-- SELECT /--> | |
<div class="form-group"> | |
<label for="nome">Nome</label> | |
<input type="text" id="nome" name="nome" class="form-control" placeholder="Nome"> </div> | |
<div class="form-group"> | |
<label for="email">E-Mail</label> | |
<input type="text" id="email" name="email" class="form-control" placeholder="E-Mail"> </div> | |
<div class="form-group"> | |
<textarea id="mensagem" name="mensagem" class="form-control" placeholder="Digite sua mensagem"></textarea> | |
</div> | |
<button type="submit" class="btn btn-default">Enviar</button> | |
</form> | |
<a target="_blank" href="http://bulfaitelo.com.br/2017/04/tutorial-laravel-para-iniciantes-parte2.html"> Tutorial Laravel para iniciantes - Parte 02 [Primeiro Formulario e MVC] </a><br> | |
<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> | |
<h3>Listar:</h3> | |
<a target="_blank" href="listar"> Listar envios! </a> | |
</div> | |
@endsection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment