Last active
April 25, 2017 20:35
-
-
Save bulfaitelo/426dc9514f656ffc2e29a88849a80001 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]
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bullfaitelo Form test</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<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> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment