PHP code example of gw1nblayd / livewire-gtoaster
1. Go to this page and download the library: Download gw1nblayd/livewire-gtoaster 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/ */
gw1nblayd / livewire-gtoaster example snippets
declare(strict_types=1);
namespace App\Livewire;
use Gw1nblayd\GToaster\Livewire\Traits\GToaster;
use Illuminate\View\View;
use Livewire\Component;
class TestComponent extends Component
{
use GToaster;
public function submit(): void
{
$this->toastSuccess('All is good');
$this->toastError('Something went wrong');
$this->toastInfo('Just an info message');
$this->toastWarning('Be careful!');
}
}