Skip to content

Instantly share code, notes, and snippets.

@NandoKstroNet
Created October 27, 2020 16:58
Show Gist options
  • Save NandoKstroNet/c48c78bd38031443faff9795d8a9cee8 to your computer and use it in GitHub Desktop.
Save NandoKstroNet/c48c78bd38031443faff9795d8a9cee8 to your computer and use it in GitHub Desktop.
View Componente Livewire com Bootstrap
<div>
<h2>Criar Contato</h2>
<div>
<form wire:submit.prevent="create" method="post">
<div class="col-12">
@if (session()->has('message'))
<div class="alert alert-danger">
{{ session('message') }}
</div>
@endif
</div>
<div class="form-group">
<label>Nome</label>
<input type="text" wire:model="name" class="form-control @error('phone') is-invalid @enderror">
<div class="invalid-feedback">
@error('name')
{{$message}}
@enderror
</div>
</div>
<div class="form-group">
<label>Email</label>
<input type="email" wire:model="email" class="form-control @error('phone') is-invalid @enderror">
<div class="invalid-feedback">
@error('email')
{{$message}}
@enderror
</div>
</div>
<div class="form-group">
<label>Telefone</label>
<input type="text" wire:model="phone" class="form-control @error('phone') is-invalid @enderror">
<div class="invalid-feedback">
@error('phone')
{{$message}}
@enderror
</div>
</div>
<button type="submit" class="btn btn-lg btn-success">
Adicionar Contato
</button>
</form>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment