PHP code example of pleshkovpa / toasts-livewire

1. Go to this page and download the library: Download pleshkovpa/toasts-livewire 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/ */

    

pleshkovpa / toasts-livewire 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!'));
}
console
php artisan vendor:publish --tag=toasts-livewire:config
console
php artisan vendor:publish --tag=toasts-livewire:views