Commit 810b655d authored by Vytor Calixto's avatar Vytor Calixto 👾

View para novo evento funcionando

parent 40d2cd18
......@@ -24,9 +24,9 @@ class EventController extends Controller
public function newEvent() {
$event = new Event();
$event->date = date();
$event->date = date('dd-MM-YYYY');
$event->certificate_text = "Certificamos que {{PARTICIPANTE}} participou {{TIPO}} {{NOME}} realizado no dia {{DATA}} com carga horária de {{HORAS}}.";
return view('home', [
return view('events.new', [
'event' => $event
]);
}
......
......@@ -15,7 +15,7 @@ Route::get('/', 'HomeController@index');
/* ----------- Rotas de Eventos ----------- */
Route::get('/eventos', 'EventController@index'); //lista todos os eventos
Route::get('/eventos/{evento}', 'EventController@eventIndex'); //mostra um evento específico
// Route::get('/eventos/{evento}', 'EventController@eventIndex'); //mostra um evento específico
Route::get('/eventos/novo', 'EventController@newEvent'); //Formulário para novo evento
Route::auth();
......
<form class="" action="" method="post">
<div class="input-group">
<span class="input-group-addon">Nome</span>
<input type="text" name="name" value="{{ $event->name }}">
<input type="text" name="name" class="form-control"class="form-control" value="{{ $event->name }}">
</div>
<div class="input-group">
<span class="input-group-addon">Tipo</span>
<input type="text" name="type" value="{{ $event->type }}">
<input type="text" name="type" class="form-control" value="{{ $event->type }}">
</div>
<div class="input-group">
<span class="input-group-addon">Data</span>
<input type="date" name="date" value="{{ $event->date }}">
<input type="date" name="date" class="form-control" value="{{ $event->date }}">
</div>
<div class="input-group">
<span class="input-group-addon">Local</span>
<input type="text" name="place" value="{{ $event->place }}">
<input type="text" name="place" class="form-control"class="form-control" value="{{ $event->place }}">
</div>
<div class="input-group">
<span class="input-group-addon">Horas formativas</span>
<input type="number" name="hours" value="{{ $event->hours }}">
<input type="number" name="hours" class="form-control"class="form-control" value="{{ $event->hours }}">
</div>
<button type="submit" name="button" class="btn btn-primary">Enviar</button>
<a role="button" href="{{ url('/eventos') }}" class="btn btn-default">Cancelar</a>
</form>
......@@ -11,7 +11,7 @@
</div>
<div class="row">
<div class="col-md-10 col-md-offset-1">
@include ('_form')
@include ('events._form')
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment