<?php

namespace App\Traits;

use Flux\Flux;

trait WithToast
{
    public function toast(string $text, string $heading = 'Berhasil', string $variant = 'success', int $duration = 5000)
    {
        Flux::toast(
            heading: $heading,
            text: $text,
            variant: $variant,
            duration: $duration
        );
    }
}
