Last active
February 3, 2021 09:11
-
-
Save gwleuverink/58dde9d0bdb4e9543778632e01841f48 to your computer and use it in GitHub Desktop.
Experiment loading livewire component from gist
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> | |
<label for="email" class="block text-sm font-medium leading-5 text-gray-700"> | |
Email address | |
</label> | |
<div class="mt-1 rounded-md shadow-sm"> | |
<input wire:model="email" id="email" type="email" required autofocus class="@error('email') border-red-500 @enderror appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md placeholder-gray-400 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 transition duration-150 ease-in-out sm:text-sm sm:leading-5" /> | |
</div> | |
@error('email') <div class="mt-1 text-red-500 text-sm">{{ $message }}</div> @enderror | |
</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
public $email; | |
public function updated($name) | |
{ | |
$this->validateOnly($name, [ | |
'email' => 'required|email', | |
]); | |
} |
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
[ | |
'root' => 'Root.php', | |
'email-validation' => 'EmailValidation.php', | |
] |
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> | |
<h2>{{ $message }}</h2> | |
<livewire:email-validation /> | |
</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
Root extends Component { | |
public $message = "This is the root componenent. Below you see a nested component. All loaded from Gist!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment