Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mansha99/68ab05f9c6d268eaebc9cd047c1b5d70 to your computer and use it in GitHub Desktop.
Save mansha99/68ab05f9c6d268eaebc9cd047c1b5d70 to your computer and use it in GitHub Desktop.
View for Livewire Calculator Component
<div style="background: #aaffcc;padding:20;width:240px">
<h5>Calculator Component</h5>
<form wire:submit.prevent="multiply">
First<br/>
<input type="text" wire:model="n1" />
<br/>
@error('n1')
{{ $message }}
@enderror
<br/>Second<br/>
<input type=text wire:model="n2" />
<br/>
@error('n2')
{{ $message }}
@enderror
<br /> <br />
<button type="submit">Multiply</button>
</form>
{{ $result }}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment