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
This is test |
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
<?php | |
namespace App\Http\Livewire; | |
use Livewire\Component; | |
class Inventors extends Component | |
{ | |
//properties | |
public $inventor; |
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
<div> | |
<select wire:model="invention"> | |
@foreach ($list as $k => $v) | |
<option value="{{ $k }}">{{ $k }}</option> | |
@endforeach | |
</select> invented by | |
{{ $inventor }} | |
</div> |
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
<html> | |
<head> | |
@livewireStyles | |
@livewireScripts | |
</head> | |
<body> | |
<livewire:inventors /> | |
</body> |
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
<?php | |
namespace App\Http\Livewire; | |
use Livewire\Component; | |
class Calculator extends Component | |
{ | |
public $n1; | |
public $n2; |
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
<?php | |
namespace App\Http\Livewire; | |
use Livewire\Component; | |
class Sender extends Component | |
{ | |
public function fireTimestampEvent() | |
{ |
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
<div style="background: #aaccff;padding:20;width:240px"> | |
<h5>Sender</h5> | |
<button wire:click="fireTimestampEvent()">Gnerate Event </button> | |
</div> |
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
<?php | |
namespace App\Http\Livewire; | |
use Livewire\Component; | |
class Receiver extends Component | |
{ | |
public $message="Received no event so far"; | |
public $timeStamp=''; |
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
<div style="background: #ffaacc;padding:20;width:240px"> | |
<h5>Receiver</h5> | |
{{$message}} {{$timeStamp}} | |
</div> |
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
<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/> |
OlderNewer