PHP code example of bastinald / laravel-livewire-toasts
1. Go to this page and download the library: Download bastinald/laravel-livewire-toasts library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bastinald / laravel-livewire-toasts example snippets
public function save()
{
$this->validate();
$this->user->update([
'name' => $this->name,
'email' => $this->email,
]);
$this->emit('showToast', 'success', __('User updated!'));
}
public function save()
{
$this->validate();
// save the record
$this->emit('showToast', 'info', __('Record saved!'));
}