# Alert

<figure><img src="https://598543987-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3nnlrjn6TtcCpL6SXFhI%2Fuploads%2FDHLZzE96PvTBGLCf76mk%2FScreenshot%202022-10-31%20at%201.49.53%20PM.png?alt=media&#x26;token=5669a2ab-8d7d-453a-86f5-7b0669221c89" alt=""><figcaption></figcaption></figure>

we have create a magic class for make a toster alert useing `session()` the class takes the message and the type and handle it on the frontend.

### Using

To use the `Alert` class it easy at the end of any method you can clickable

```php
return Alert::make(__('Your Message'))->type('success')->fire();
```

the method has 2 type `success` , `danger` to handle response
