sweet-alert icon indicating copy to clipboard operation
sweet-alert copied to clipboard

Add view() Method Which Renders HTML Via A Blade View

Open kellerjmrtn opened this issue 1 year ago • 2 comments

Inspired by https://github.com/barryvdh/laravel-dompdf/, specifically the loadView method in PDF.php.

This allows you to specify a blade view for your alert, rather than hardcoding the HTML, which is useful anytime your HTML is more complex than a simple tag.

Usage:

use RealRashid\SweetAlert\Facades\Alert;

Alert::view('The Title', 'my-view');

kellerjmrtn avatar Jun 27 '23 22:06 kellerjmrtn

WOW!

Let me test it.

By the way thanks for this PR..

realrashid avatar Jun 28 '23 21:06 realrashid

Hey @kellerjmrtn ,

Can you add this changes to docs ?

realrashid avatar Jul 06 '23 19:07 realrashid