1. Go to this page and download the library: Download mrclln/wire-sileo 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/ */
mrclln / wire-sileo example snippets
use Livewire\Attributes\On;
use Sileo\Facades\Sileo;
class MyComponent extends Component
{
public function success(): void
{
Sileo::success('Saved successfully');
}
public function action(): void
{
Sileo::action()
->title('New sale')
->description('A new order was placed.')
->button('View', 'openOrder', ['id' => $order->id])
->send();
}
#[On('deleteRecord')]
public function deleteRecord(): void
{
// Handle deletion
$this->record->delete();
}
}
Sileo::success()
->title('Success!')
->description('Your changes have been saved.')
->position('top-right') // or Position::TopRight
->duration(5000)
->theme('dark')
->fill('#1f2937')
->roundness(20)
->styles(['title' => 'text-white', 'description' => 'text-slate-300'])
->send();
Sileo::success()
->title('Done!')
->html('<strong>Item</strong> was saved successfully.')
->send();