<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rashid Ali</title>
    <description>The latest articles on DEV Community by Rashid Ali (@realrashid).</description>
    <link>https://dev.to/realrashid</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F154665%2F1b6ffee0-2aab-4eb5-9a70-1aa4951d0645.png</url>
      <title>DEV Community: Rashid Ali</title>
      <link>https://dev.to/realrashid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/realrashid"/>
    <language>en</language>
    <item>
      <title>🎉 Announcing Cart Package Coupon Feature!</title>
      <dc:creator>Rashid Ali</dc:creator>
      <pubDate>Sun, 11 Aug 2024 14:31:46 +0000</pubDate>
      <link>https://dev.to/realrashid/announcing-cart-package-coupon-feature-3dk3</link>
      <guid>https://dev.to/realrashid/announcing-cart-package-coupon-feature-3dk3</guid>
      <description>&lt;p&gt;I am thrilled to unveil an exciting new feature for the Cart package: &lt;strong&gt;Coupons&lt;/strong&gt;! This update brings enhanced flexibility and functionality to your Laravel-based e-commerce solutions, making it easier than ever to offer discounts and promotions to your customers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s New?
&lt;/h2&gt;

&lt;p&gt;With the new Coupon feature, you can now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apply Discounts&lt;/strong&gt;: Add both percentage-based and fixed amount coupons to your cart.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create Custom Coupons&lt;/strong&gt;: Develop your own coupon classes to suit your unique business needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manage Coupons Efficiently&lt;/strong&gt;: Apply, remove, and get details of applied coupons with ease.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Apply Coupons with Ease&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Integrate discount promotions effortlessly with our new methods. You can apply a coupon to your cart using a simple method call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;RealRashid\Cart\Facades\Cart&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Coupons\PercentageCoupon&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Create a percentage-based coupon&lt;/span&gt;
&lt;span class="nv"&gt;$percentageCoupon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;PercentageCoupon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'PERCENT20'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'2024-12-31'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Apply it to the cart&lt;/span&gt;
&lt;span class="nc"&gt;Cart&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;instance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'cart'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;applyCoupon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$percentageCoupon&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;2. Custom Coupon Classes&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Design and implement custom coupon classes by implementing the &lt;code&gt;Coupon&lt;/code&gt; interface. Here’s a sample of a fixed amount coupon:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;App\Coupons&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;RealRashid\Cart\Coupon\Coupon&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nc"&gt;CouponContract&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Models\Coupon&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nc"&gt;CouponModel&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;FixedAmountCoupon&lt;/span&gt; &lt;span class="kd"&gt;implements&lt;/span&gt; &lt;span class="nc"&gt;CouponContract&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;protected&lt;/span&gt; &lt;span class="nv"&gt;$coupon&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;CouponModel&lt;/span&gt; &lt;span class="nv"&gt;$coupon&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;coupon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$coupon&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;getCode&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;coupon&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;isValid&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;coupon&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;isValid&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;getDiscountType&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s1"&gt;'fixed_amount'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;getExpiryDate&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;coupon&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;expiry_date&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;getDiscountAmount&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;coupon&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;3. Manage Applied Coupons&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Easily manage your applied coupons with new methods to apply, remove, and retrieve details about your coupons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apply Coupon&lt;/strong&gt;: &lt;code&gt;Cart::applyCoupon($coupon);&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove Coupon&lt;/strong&gt;: &lt;code&gt;Cart::removeCoupon();&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get Coupon Details&lt;/strong&gt;: &lt;code&gt;Cart::getAppliedCouponDetails();&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Get Started
&lt;/h2&gt;

&lt;p&gt;Ready to add discounts to your cart? Follow the updated &lt;a href="https://realrashid.github.io/cart/usage/apply-coupon" rel="noopener noreferrer"&gt;usage documentation&lt;/a&gt; for detailed instructions on how to leverage the new Coupon feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;Coupons are a powerful tool for increasing sales and enhancing customer satisfaction. By integrating this feature into the Cart package, we aim to make it easier for you to run effective promotions and manage discounts, ultimately driving more value to your customers and business.&lt;/p&gt;

&lt;h2&gt;
  
  
  Join the Conversation
&lt;/h2&gt;

&lt;p&gt;I would love to hear your feedback! Share your thoughts and experiences with the new Coupon feature by joining our community forums or connecting with us on social media.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check It Out
&lt;/h2&gt;

&lt;p&gt;Explore the Cart package and contribute to its development on our &lt;a href="https://github.com/realrashid/cart" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;Thank you for your continued support. Stay tuned for more exciting updates and features!&lt;/p&gt;

&lt;p&gt;Happy discounting! 🎉&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>realrashid</category>
      <category>cart</category>
      <category>php</category>
    </item>
    <item>
      <title>🎉 Announcing the Release of Laravel Zoho Cliq Package! 🚀</title>
      <dc:creator>Rashid Ali</dc:creator>
      <pubDate>Sun, 11 Aug 2024 13:20:06 +0000</pubDate>
      <link>https://dev.to/realrashid/announcing-the-release-of-laravel-zoho-cliq-package-1ofn</link>
      <guid>https://dev.to/realrashid/announcing-the-release-of-laravel-zoho-cliq-package-1ofn</guid>
      <description>&lt;p&gt;I’m excited to announce the release of the &lt;strong&gt;Laravel Zoho Cliq&lt;/strong&gt; package, a powerful tool designed to bring seamless integration between Laravel applications and Zoho Cliq. Whether you're building a new app or enhancing an existing one, this package makes it incredibly easy to send messages, notifications, and rich content directly from your Laravel application to Zoho Cliq.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Send Messages to Multiple Users&lt;/strong&gt;: Effortlessly broadcast messages to multiple Zoho Cliq users from your Laravel application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single User Messaging&lt;/strong&gt;: Send personalized messages to individual users with ease.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rich Card Messaging&lt;/strong&gt;: Create visually engaging messages with interactive cards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Channel Messaging&lt;/strong&gt;: Communicate with specific channels to keep your teams informed and engaged.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to Get Started
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install the Package&lt;/strong&gt;: Add the Laravel Zoho Cliq package to your Laravel application using Composer:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require realrashid/laravel-zoho-cliq
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Publish Configuration&lt;/strong&gt;: Publish the configuration file to set up your credentials:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan cliq:install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Configure OAuth Credentials&lt;/strong&gt;: Obtain your &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt; from Zoho Cliq’s API Console:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Visit &lt;a href="https://api-console.zoho.com/" rel="noopener noreferrer"&gt;Zoho API Console&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Get Started&lt;/strong&gt; button and select &lt;strong&gt;Self Client&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create&lt;/strong&gt;, then &lt;strong&gt;OK&lt;/strong&gt; when prompted.&lt;/li&gt;
&lt;li&gt;Copy the &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt;, and add them to your &lt;code&gt;.env&lt;/code&gt; file:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CLIQ_CLIENT_ID=your-client-id
CLIQ_CLIENT_SECRET=your-client-secret
CLIQ_DEFAULT_CHANNEL=your-default-channel
CLIQ_DEFAULT_SEND_TO=buddies
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example Usages
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Send a Message to Multiple Users&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;  &lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/send-buddy-message'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nv"&gt;$response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Cliq&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;to&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s1"&gt;'user1@example.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'user2@example.com'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
          &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello team! This is a message from Laravel."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;response&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Send a Message with a Card&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;  &lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/send-card-message'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nv"&gt;$response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Cliq&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;toChannel&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'alerts'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;card&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="s1"&gt;'New Feature Released!'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s1"&gt;'https://example.com/image.jpg'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s1"&gt;'https://example.com/image.jpg'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s1"&gt;'modern-inline'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s1"&gt;'Release Bot'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="p"&gt;[&lt;/span&gt;
                  &lt;span class="p"&gt;[&lt;/span&gt;
                      &lt;span class="s1"&gt;'label'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Learn More'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="s1"&gt;'hint'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Click to learn more about the feature'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="s1"&gt;'action_type'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'open.url'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="s1"&gt;'web_url'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'https://example.com/feature'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="p"&gt;],&lt;/span&gt;
                  &lt;span class="p"&gt;[&lt;/span&gt;
                      &lt;span class="s1"&gt;'label'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Feedback'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="s1"&gt;'hint'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Provide feedback on the new feature'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="s1"&gt;'action_type'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'open.url'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="s1"&gt;'web_url'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'https://example.com/feedback'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="p"&gt;]&lt;/span&gt;
              &lt;span class="p"&gt;]&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"I’m excited to announce the release of our new feature!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;response&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Send a Message to a Channel&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;  &lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/send-message-channel'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nv"&gt;$response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Cliq&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;toChannel&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'general'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Good morning, everyone! Here’s the latest update from Laravel."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;response&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why Use Laravel Zoho Cliq?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Seamless Integration&lt;/strong&gt;: Easily integrate Zoho Cliq into your Laravel applications with minimal configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rich Features&lt;/strong&gt;: Leverage advanced features like rich card messaging to enhance your communication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open Source&lt;/strong&gt;: Contribute and benefit from a package that’s actively maintained and community-driven.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Get Involved
&lt;/h3&gt;

&lt;p&gt;I welcome contributions and feedback! If you have suggestions or improvements, please check out the &lt;a href="https://github.com/realrashid/laravel-zoho-cliq" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; and consider contributing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Support
&lt;/h3&gt;

&lt;p&gt;If you find this package useful and would like to support my work, you can buy me a coffee. Your support helps me continue to maintain and improve the package.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/realrashid" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkcccyqndw3dhisr8npqr.png" alt="Buy me a coffee" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for using Laravel Zoho Cliq!&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>zoho</category>
      <category>cliq</category>
    </item>
    <item>
      <title>Discover How Easy It Is to Stay Updated with daily.dev! Join Our Laravel Developers Squad Today!</title>
      <dc:creator>Rashid Ali</dc:creator>
      <pubDate>Wed, 19 Jun 2024 10:26:56 +0000</pubDate>
      <link>https://dev.to/realrashid/discover-how-easy-it-is-to-stay-updated-with-dailydev-join-our-laravel-developers-squad-today-2848</link>
      <guid>https://dev.to/realrashid/discover-how-easy-it-is-to-stay-updated-with-dailydev-join-our-laravel-developers-squad-today-2848</guid>
      <description>&lt;p&gt;🌟 Calling all developers! 🌟&lt;/p&gt;

&lt;p&gt;Hey fellow developers,&lt;/p&gt;

&lt;p&gt;Are you looking for a seamless way to stay updated with the latest in tech, programming trends, and news? Look no further than daily.dev! It's your go-to hub for staying informed without the hassle. Whether you're into web development, machine learning, or anything in between, daily.dev curates the best articles, news, and resources just for you. Trust me, it's the developer's best friend!&lt;/p&gt;

&lt;p&gt;Discover for yourself how easy it is to stay in the loop. Join us at &lt;a href="https://dly.to/Kva353Ff7Ln"&gt;daily.dev&lt;/a&gt; and see why thousands of developers rely on it daily.&lt;/p&gt;

&lt;p&gt;But wait, there's more! 🚀&lt;/p&gt;

&lt;p&gt;Calling all Laravel developers! 🛠️ Join our exclusive Squad where you can connect with like-minded developers, share tips, troubleshoot errors, explore new packages, and dive into insightful articles. It's your community to grow and excel in Laravel development.&lt;/p&gt;

&lt;p&gt;Join the Laravel Developers Squad now at &lt;a href="https://dly.to/kVX24NYCQtg"&gt;Laravel Developers Squad&lt;/a&gt; and start collaborating today!&lt;/p&gt;

&lt;p&gt;Let's stay connected and keep pushing the boundaries of what's possible in development. See you there!&lt;/p&gt;

&lt;p&gt;Happy coding! 🖥️💻&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Enhancing Enum Constants in Laravel with Description and Label Attributes</title>
      <dc:creator>Rashid Ali</dc:creator>
      <pubDate>Wed, 19 Jun 2024 09:40:15 +0000</pubDate>
      <link>https://dev.to/realrashid/enhancing-enum-constants-in-laravel-with-description-and-label-attributes-5df5</link>
      <guid>https://dev.to/realrashid/enhancing-enum-constants-in-laravel-with-description-and-label-attributes-5df5</guid>
      <description>&lt;p&gt;PHP attributes provide a powerful way to add metadata to classes and constants, enhancing readability and organization in frameworks like Laravel. Let's explore how to use &lt;code&gt;Description&lt;/code&gt; and &lt;code&gt;Label&lt;/code&gt; attributes to annotate enum constants in Laravel, specifically with an &lt;code&gt;OrderStatus&lt;/code&gt; example.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding PHP Attributes in Enums
&lt;/h3&gt;

&lt;p&gt;PHP attributes allow us to attach metadata to classes, methods, properties, and constants. In Laravel, this feature can streamline the management of descriptive metadata for enum constants such as status codes or types.&lt;/p&gt;

&lt;h3&gt;
  
  
  Implementing Description and Label Attributes
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Step 1: Define Attribute Classes
&lt;/h4&gt;

&lt;p&gt;Create attribute classes that extend a base &lt;code&gt;AttributeProperty&lt;/code&gt; class to encapsulate metadata values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;App\Attributes&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Attribute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cm"&gt;/* Base class for attribute properties */&lt;/span&gt;
&lt;span class="na"&gt;#[Attribute(Attribute::TARGET_CLASS_CONSTANT)]&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AttributeProperty&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="no"&gt;ATTRIBUTE_PATH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'App\Attributes\\'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;protected&lt;/span&gt; &lt;span class="kt"&gt;mixed&lt;/span&gt; &lt;span class="nv"&gt;$value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="kt"&gt;mixed&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="cm"&gt;/* Attribute for describing enum constants */&lt;/span&gt;
&lt;span class="na"&gt;#[Attribute(Attribute::TARGET_CLASS_CONSTANT)]&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Description&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;AttributeProperty&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="cm"&gt;/* Attribute for labeling enum constants */&lt;/span&gt;
&lt;span class="na"&gt;#[Attribute(Attribute::TARGET_CLASS_CONSTANT)]&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Label&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;AttributeProperty&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="n"&gt;php&lt;/span&gt;

&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;App\Traits&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Attributes\AttributeProperty&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;BadMethodCallException&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Support\Str&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;ReflectionAttribute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;ReflectionEnum&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;trait&lt;/span&gt; &lt;span class="nc"&gt;AttributableEnum&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cd"&gt;/**
     * Call the given method on the enum case
     *
     */&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$method&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;array&lt;/span&gt; &lt;span class="nv"&gt;$arguments&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kt"&gt;mixed&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Get attributes of the enum case with reflection API&lt;/span&gt;
        &lt;span class="nv"&gt;$reflection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ReflectionEnum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;static&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;class&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nv"&gt;$attributes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$reflection&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getAttributes&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

        &lt;span class="c1"&gt;// Check if attribute exists in our attributes list&lt;/span&gt;
        &lt;span class="nv"&gt;$filtered_attributes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;array_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$attributes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;ReflectionAttribute&lt;/span&gt; &lt;span class="nv"&gt;$attribute&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$attribute&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getName&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nc"&gt;AttributeProperty&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;ATTRIBUTE_PATH&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="nc"&gt;Str&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nb"&gt;ucfirst&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$method&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

        &lt;span class="c1"&gt;// If not, throw an exception&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;empty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$filtered_attributes&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BadMethodCallException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Call to undefined method %s::%s()'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$method&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;array_shift&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$filtered_attributes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;newInstance&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 2: Create the Enum Using Attributes
&lt;/h4&gt;

&lt;p&gt;Define an enum &lt;code&gt;OrderStatus&lt;/code&gt; that uses &lt;code&gt;Label&lt;/code&gt; and &lt;code&gt;Description&lt;/code&gt; attributes to annotate its constants:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;App\Enums&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Attributes\Label&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Attributes\Description&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Attributes\AttributeProperty&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Traits\AttributableEnum&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;enum&lt;/span&gt; &lt;span class="nc"&gt;OrderStatus&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;AttributableEnum&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="na"&gt;#[Label('Pending')]&lt;/span&gt;
    &lt;span class="na"&gt;#[Description('Order is pending')]&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Pending&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'pending'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="na"&gt;#[Label('Confirmed')]&lt;/span&gt;
    &lt;span class="na"&gt;#[Description('Order is confirmed')]&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Confirmed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'confirmed'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="na"&gt;#[Label('Canceled')]&lt;/span&gt;
    &lt;span class="na"&gt;#[Description('Order has been canceled')]&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Canceled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'canceled'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="na"&gt;#[Label('Completed')]&lt;/span&gt;
    &lt;span class="na"&gt;#[Description('Order has been completed')]&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Completed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'completed'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 3: Accessing Enum Attributes
&lt;/h4&gt;

&lt;p&gt;With the defined &lt;code&gt;Description&lt;/code&gt; and &lt;code&gt;Label&lt;/code&gt; attributes, you can access their values through methods defined in &lt;code&gt;AttributeProperty&lt;/code&gt; or directly within your Laravel application's logic. For example, to retrieve the description of an enum constant:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="nv"&gt;$statusDescription&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OrderStatus&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;Pending&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getDescription&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// Output: 'Order is pending'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Using PHP attributes such as &lt;code&gt;Label&lt;/code&gt; and &lt;code&gt;Description&lt;/code&gt; with enums in Laravel enables you to centralize and manage descriptive metadata for enum constants effectively. This approach improves code clarity, simplifies maintenance, and enhances the readability of your Laravel applications.&lt;/p&gt;

&lt;p&gt;By leveraging attributes in enums, you can streamline how you define and use status codes, types, or any other constant values that require additional descriptive information.&lt;/p&gt;

&lt;p&gt;Start using PHP attributes in enums today to enhance your Laravel projects and maintain a clean, organized codebase!&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>enum</category>
      <category>attributes</category>
    </item>
    <item>
      <title>Join Our Vibrant Laravel Developers Squad!</title>
      <dc:creator>Rashid Ali</dc:creator>
      <pubDate>Wed, 19 Jun 2024 09:15:47 +0000</pubDate>
      <link>https://dev.to/realrashid/join-our-vibrant-laravel-developers-squad-alh</link>
      <guid>https://dev.to/realrashid/join-our-vibrant-laravel-developers-squad-alh</guid>
      <description>&lt;p&gt;Are you passionate about Laravel development? Whether you're a seasoned developer or just starting out, our Laravel Developers Squad is the perfect community for you. Join us as we dive into the world of Laravel, share insights, troubleshoot together, explore new packages, and discuss the latest trends shaping our industry.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Join Our Squad?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Community Connection:&lt;/strong&gt; Connect with a diverse group of Laravel enthusiasts who share your passion for coding and learning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Knowledge Sharing:&lt;/strong&gt; Share your expertise, tips, and tricks while learning from others. Our squad is all about mutual growth and support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Stay Updated:&lt;/strong&gt; Stay ahead with the latest updates, best practices, and emerging trends in the Laravel ecosystem.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Get Started
&lt;/h3&gt;

&lt;p&gt;Joining is easy! Simply follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Click on the invitation link to join our Squad: &lt;a href="https://dly.to/kVX24NYCQtg"&gt;Join Laravel Developers Squad&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Introduce yourself! Start by saying hello and let us know what excites you most about Laravel.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dive into discussions: Share your thoughts, ask questions, and engage with fellow developers. Your input is valuable to our community.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Our Commitment
&lt;/h3&gt;

&lt;p&gt;We strive to maintain a welcoming and respectful environment for everyone:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Respect:&lt;/strong&gt; Treat others with kindness and respect diverse perspectives.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Constructive Feedback:&lt;/strong&gt; Offer feedback that helps others grow without discouraging them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Relevance:&lt;/strong&gt; Keep discussions focused on Laravel development and related topics.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Let's Code Together!
&lt;/h3&gt;

&lt;p&gt;Join us in shaping the future of Laravel development. Together, we can innovate, build, and create amazing projects. Click the link, introduce yourself, and let's embark on this exciting journey!&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://dly.to/kVX24NYCQtg"&gt;Join Laravel Developers Squad&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See you in the Squad!&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>Introducing Cart: Simplifying Shopping Cart Management for Laravel</title>
      <dc:creator>Rashid Ali</dc:creator>
      <pubDate>Sun, 16 Jun 2024 00:00:00 +0000</pubDate>
      <link>https://dev.to/realrashid/introducing-cart-simplifying-shopping-cart-management-for-laravel-28ek</link>
      <guid>https://dev.to/realrashid/introducing-cart-simplifying-shopping-cart-management-for-laravel-28ek</guid>
      <description>&lt;p&gt;In the fast-paced world of e-commerce, efficient shopping cart management isn't just essential—it's a competitive advantage. Today, I'm thrilled to unveil &lt;strong&gt;Cart&lt;/strong&gt;, a powerful Laravel package designed to streamline and elevate your online retail experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Cart Matters
&lt;/h3&gt;

&lt;p&gt;Effective cart management is crucial for any successful e-commerce venture. Whether you're running a small boutique shop or a large-scale marketplace, seamless cart operations can significantly impact your customer's shopping journey. Cart acts as your trusted ally, offering a robust set of features tailored specifically for Laravel applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unveiling Key Features
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Flexible Configuration&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cart allows you to customize each cart instance with specific tax rates, configurations, and business rules tailored to your unique needs. Whether managing different tax jurisdictions or implementing promotional discounts, Cart adapts effortlessly to your business requirements.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Multiple Instances Management&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With Cart, you can define and manage multiple cart instances within a single Laravel application. This capability is particularly valuable for scenarios requiring separate carts for different user sessions, order types, or temporary storage.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Dynamic Tax Calculation&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Tax rules can vary based on location, product type, or customer category. Cart empowers you to enable or disable tax calculations on a per-instance basis, ensuring compliance and flexibility in tax handling across diverse markets.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Intuitive API Integration&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Seamlessly integrate Cart into your Laravel application with its intuitive API. Whether adding products, updating quantities, or retrieving cart details, the API simplifies interactions and enhances development efficiency.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Extensive Documentation and Support&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Navigating a new package can be daunting, but Cart provides comprehensive documentation that guides you through installation, configuration, and advanced usage scenarios. Additionally, our dedicated support ensures you're supported throughout your journey with Cart.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started with Cart
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Installation
&lt;/h4&gt;

&lt;p&gt;Getting started with Cart is straightforward. Begin by installing the package via Composer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require realrashid/cart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, publish Cart's configuration and other necessary assets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan cart:install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Basic Usage
&lt;/h4&gt;

&lt;p&gt;Once installed, using Cart is as simple as including its facade in your Laravel controllers or services. Here's a quick example of adding an item to the cart:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;RealRashid\Cart\Facades\Cart&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Add a product to the cart&lt;/span&gt;
&lt;span class="nc"&gt;Cart&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Sample Product'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;25.00&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'size'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'M'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'color'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Blue'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Advanced Features
&lt;/h4&gt;

&lt;p&gt;Explore Cart's advanced features like updating item details, calculating taxes, managing multiple cart instances, and more. Dive deeper into our documentation to harness the full potential of Cart for your business.&lt;/p&gt;

&lt;h3&gt;
  
  
  Support and Contribution
&lt;/h3&gt;

&lt;p&gt;Cart is open-source software licensed under the MIT License. We welcome contributions from the community to enhance Cart's capabilities and ensure it meets the evolving needs of Laravel developers worldwide.&lt;/p&gt;

&lt;h3&gt;
  
  
  Show Your Support on ProductHunt!
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.producthunt.com/posts/cart-simplifying-cart-for-laravel?embed=true&amp;amp;utm_source=badge-featured&amp;amp;utm_medium=badge&amp;amp;utm_souce=badge-cart-simplifying-cart-for-laravel" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fapi.producthunt.com%2Fwidgets%2Fembed-image%2Fv1%2Ffeatured.svg%3Fpost_id%3D463625%26theme%3Dlight" alt="Cart - Simplifying Cart for Laravel on Product Hunt"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In conclusion, Cart is more than just a package—it's a solution designed to optimize your Laravel-powered e-commerce platform. Whether you're a developer streamlining cart management or a business owner aiming to enhance customer satisfaction, Cart provides the tools and flexibility you need.&lt;/p&gt;

&lt;p&gt;Ready to transform your shopping cart experience? Get started with &lt;a href="https://github.com/realrashid/cart" rel="noopener noreferrer"&gt;Cart today&lt;/a&gt; and discover a new level of efficiency and control in managing your online store.&lt;/p&gt;

&lt;p&gt;If you find Cart helpful and would like to support my work, you can &lt;a href="https://www.buymeacoffee.com/realrashid" rel="noopener noreferrer"&gt;buy me a coffee&lt;/a&gt;. Your support keeps this project alive and thriving.&lt;/p&gt;

&lt;p&gt;Thank you for being part of this journey.&lt;/p&gt;

&lt;p&gt;Warm regards,&lt;/p&gt;

&lt;p&gt;Rashid Ali&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>cart</category>
      <category>shopping</category>
      <category>php</category>
    </item>
    <item>
      <title>Introducing PlanCraft</title>
      <dc:creator>Rashid Ali</dc:creator>
      <pubDate>Mon, 23 Oct 2023 18:58:48 +0000</pubDate>
      <link>https://dev.to/realrashid/introducing-plancraft-23dh</link>
      <guid>https://dev.to/realrashid/introducing-plancraft-23dh</guid>
      <description>&lt;p&gt;Today, I am thrilled to introduce you to a groundbreaking solution that reimagines how you handle subscription plans in your Laravel applications. &lt;br&gt;
Say hello to &lt;strong&gt;PlanCraft&lt;/strong&gt; – a meticulously designed Laravel package engineered to simplify the creation and management of subscription plans, all without the need for additional database tables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No More Database Tables, No More Queries&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The standout feature of PlanCraft is its database-less approach to subscription management. &lt;br&gt;
You can now define plans directly within the &lt;strong&gt;PlanCraftServiceProvider&lt;/strong&gt;, completely eliminating the need for extensive database storage. &lt;br&gt;
This innovative approach not only streamlines your application's subscription workflow but also makes it lighter and more efficient, ultimately enhancing the performance of your application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Effortless Plan Creation, Simplified Feature Management&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With the database hurdle removed, creating subscription plans becomes a seamless process. &lt;br&gt;
No more wrestling with databases or writing complex queries. &lt;br&gt;
PlanCraft empowers you to effortlessly craft and manage features within your subscription plans. &lt;br&gt;
Say goodbye to tedious tasks, and say hello to a world where every interaction is a symphony of efficiency and precision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sophisticated Eligibility Checks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Need to implement intricate eligibility checks based on subscription levels? &lt;br&gt;
PlanCraft has you covered. Perform advanced eligibility checks for specific features, ensuring that your subscribers have access to the right functionalities at the right subscription tiers. &lt;br&gt;
It's a level of customization that puts you in full control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting Started with PlanCraft&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Composer Magic:&lt;/strong&gt; Get started by injecting a dose of magic into your project with this one-liner:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   composer require realrashid/plancraft
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Publish the Scaffolding:&lt;/strong&gt; Next, give your application the gift of elegance with the following command:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   php artisan plancraft:install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Bask in the Awesomeness:&lt;/strong&gt; With PlanCraft seamlessly integrated into your Laravel application, you're ready to craft, manage, and assign features with the grace of a virtuoso.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With PlanCraft, managing subscription plans becomes an art form. &lt;br&gt;
It's not just about tasks; it's about elevating your Laravel SaaS application to new heights. &lt;br&gt;
I invite you to explore the comprehensive documentation to unlock the full potential of this revolutionary Laravel package.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://realrashid.github.io/plan-craft/"&gt;https://realrashid.github.io/plan-craft/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you find PlanCraft helpful and would like to support my work, you can buy me a coffee. &lt;br&gt;
Your support will help keep this project alive and thriving.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/realrashid"&gt;https://www.buymeacoffee.com/realrashid&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for being a part of this journey.&lt;/p&gt;

&lt;p&gt;Warm regards,&lt;/p&gt;

&lt;p&gt;Rashid Ali&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>plancrat</category>
      <category>realrashid</category>
      <category>php</category>
    </item>
    <item>
      <title>sweet-alert v7.0.0 Released: Here's What's New</title>
      <dc:creator>Rashid Ali</dc:creator>
      <pubDate>Thu, 20 Apr 2023 07:00:00 +0000</pubDate>
      <link>https://dev.to/realrashid/sweet-alert-v700-released-heres-whats-new-914</link>
      <guid>https://dev.to/realrashid/sweet-alert-v700-released-heres-whats-new-914</guid>
      <description>&lt;p&gt;I'm excited to announce the release of sweet-alert v7.0.0, the latest version of our popular alert library for Laravel. &lt;br&gt;
This release includes several new features and bug fixes that make it easier and more customizable than ever before. &lt;/p&gt;

&lt;p&gt;Here are the highlights:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ConfirmDelete&lt;/code&gt; Function&lt;br&gt;
One of the most requested features from our users has been the ability to add a confirm delete dialog to their applications.&lt;br&gt;
With &lt;code&gt;v7.0.0&lt;/code&gt;, i've added the &lt;code&gt;confirmDelete&lt;/code&gt; function that makes it easy to create a dialog that asks users to confirm before deleting an item. &lt;br&gt;
This function is fully customizable, allowing you to choose the text, buttons, and icons that appear in the dialog.&lt;/p&gt;

&lt;p&gt;
    &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gbozN_wn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/alert/confirmDelete.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gbozN_wn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/alert/confirmDelete.gif" alt="ConfirmDelete" width="680" height="372"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Usage
&lt;/h4&gt;

&lt;p&gt;To use the &lt;code&gt;confirmDelete&lt;/code&gt; function, you need to call it in your controller method in my case its &lt;code&gt;index&lt;/code&gt; , passing in the required parameters.&lt;br&gt;&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;App\Http\Controllers&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Models\User&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Http\Request&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UsersController&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Controller&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;latest&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;paginate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="nv"&gt;$title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Delete User!'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;$text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Are you sure you want to delete?"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nf"&gt;confirmDelete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'users.index'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;compact&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'users'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This allows the confirmation alert to be displayed after a clicking the delete button.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In your view, you can add the &lt;code&gt;data-confirm-delete&lt;/code&gt; attribute to the delete button to trigger the confirmation popup. &lt;br&gt; The confirmation popup will use the configuration options set in the session flash data.  &lt;br&gt;&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;a href="{{ route('users.destroy', $user-&amp;gt;id) }}" class="btn btn-danger" data-confirm-delete="true"&amp;gt;Delete&amp;lt;/a&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The following environment variables can be used to customize the confirm alert:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SWEET_ALERT_CONFIRM_DELETE_CONFIRM_BUTTON_TEXT&lt;/code&gt; &lt;br&gt;&lt;br&gt;
This variable sets the text of the confirmation button. Default is &lt;strong&gt;Yes, delete it!&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SWEET_ALERT_CONFIRM_DELETE_CANCEL_BUTTON_TEXT&lt;/code&gt; &lt;br&gt;&lt;br&gt;
This variable sets the text of the cancel button. Default is &lt;strong&gt;Cancel&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SWEET_ALERT_CONFIRM_DELETE_SHOW_CANCEL_BUTTON&lt;/code&gt; &lt;br&gt;&lt;br&gt;
This variable sets whether to show the cancel button in the popup. Possible values are true or false. Default is &lt;strong&gt;true&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SWEET_ALERT_CONFIRM_DELETE_SHOW_CLOSE_BUTTON&lt;/code&gt; &lt;br&gt;&lt;br&gt;
This variable sets whether to show the close button in the popup. Possible values are true or false. Default is &lt;strong&gt;false&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SWEET_ALERT_CONFIRM_DELETE_ICON&lt;/code&gt; &lt;br&gt;&lt;br&gt;
This variable sets icon of the popup. Default is &lt;strong&gt;warning&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SWEET_ALERT_CONFIRM_DELETE_SHOW_LOADER_ON_CONFIRM&lt;/code&gt; &lt;br&gt;&lt;br&gt;
This variable sets whether to show a loader in delete button of the popup. Possible values are true or false. Default is &lt;strong&gt;true&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can customize the configuration options of the confirmation popup by setting the environment variables in your &lt;code&gt;.env&lt;/code&gt; file. &lt;br&gt;&lt;/p&gt;

&lt;p&gt;Themes Customization Option&lt;br&gt;
i've also added a new customization option that allows you to choose from a selection of themes for your alerts. Whether you want a light or dark theme, a bold or subtle design, or anything in between, sweet-alert v7.0.0 has you covered. &lt;/p&gt;

&lt;p&gt;You can choose a theme by setting the &lt;code&gt;SWEET_ALERT_THEME&lt;/code&gt; environment variable in your &lt;code&gt;.env&lt;/code&gt; file. &lt;br&gt;
The available themes are &lt;code&gt;dark&lt;/code&gt;, &lt;code&gt;minimal&lt;/code&gt;, &lt;code&gt;borderless&lt;/code&gt;, &lt;code&gt;bootstrap-4&lt;/code&gt;, &lt;code&gt;bulma&lt;/code&gt;, &lt;code&gt;material-ui&lt;/code&gt; and &lt;code&gt;wordpress-admin&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Dark
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;dark&lt;/code&gt; theme is a dark-themed alert box with white text. To use this theme, add the following environment variable to your .env file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SWEET_ALERT_THEME="dark"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;
    &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iCT6kY5x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-dark.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iCT6kY5x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-dark.png" alt="DarkTheme" width="532" height="243"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Minimal
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;minimal&lt;/code&gt; theme is a simple alert box with minimal styling. To use this theme, add the following environment variable to your .env file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SWEET_ALERT_THEME="minimal"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;
    &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SBlQ9MIK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-minimal.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SBlQ9MIK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-minimal.png" alt="MinimalTheme" width="532" height="243"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Borderless
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;borderless&lt;/code&gt; theme is a simple alert box with no border. To use this theme, add the following environment variable to your .env file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SWEET_ALERT_THEME="borderless"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;
    &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0VZBEfk2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-borderless.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0VZBEfk2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-borderless.png" alt="BorderlessTheme" width="532" height="243"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Bootstrap 4
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;bootstrap-4&lt;/code&gt; theme is a theme that mimics the look and feel of Bootstrap 4 alerts. To use this theme, add the following environment variable to your .env file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SWEET_ALERT_THEME="bootstrap-4"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;
    &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a8TVl16b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-bootstrap-4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a8TVl16b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-bootstrap-4.png" alt="BootstrapTheme" width="532" height="215"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Bulma
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;bulma&lt;/code&gt; theme is a theme that mimics the look and feel of Bulma alerts. To use this theme, add the following environment variable to your .env file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SWEET_ALERT_THEME="bulma"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;
    &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fj2RygN_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-bulma.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fj2RygN_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-bulma.png" alt="BulmaTheme" width="532" height="247"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Material UI
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;material-ui&lt;/code&gt; theme is a theme that mimics the look and feel of Material UI alerts. To use this theme, add the following environment variable to your .env file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SWEET_ALERT_THEME="material-ui"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;
    &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zWjgSkqq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-material-ui.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zWjgSkqq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-material-ui.png" alt="MaterialTheme" width="532" height="243"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  WordPress Admin
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;wordpress-admin&lt;/code&gt; theme is a theme that mimics the look and feel of WordPress admin alerts. To use this theme, add the following environment variable to your .env file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SWEET_ALERT_THEME="wordpress-admin"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;
    &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oly7ikJy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-wordpress-admin.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oly7ikJy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/realrashid/sweet-alert/master/imgs/themes/theme-wordpress-admin.png" alt="WordpressTheme" width="532" height="213"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Upgraded sweet-alert to Latest Version&lt;br&gt;
As always, i've upgraded sweet-alert to the latest version to ensure maximum compatibility and performance. &lt;br&gt;
This means that you can be confident that your alerts will work seamlessly using the latest versions of SweetAlert2 JavaScript library.&lt;/p&gt;

&lt;p&gt;Bug Fixes&lt;br&gt;
i've also fixed several bugs and issues that were reported by our users, including issues with text alignment and responsiveness. &lt;br&gt;
I take user feedback seriously and strive to create the best possible experience for everyone who uses sweet-alert.&lt;/p&gt;

&lt;p&gt;Docs Updated&lt;br&gt;
Finally, i've updated our documentation to reflect the new features and changes in &lt;code&gt;v7.0.0&lt;/code&gt;. &lt;br&gt;
Whether you're a new or experienced user of sweet-alert, our documentation is the best place to start to learn how to use the library to its fullest potential.&lt;/p&gt;

&lt;p&gt;Overall, I'm thrilled with the new features and improvements in sweet-alert &lt;code&gt;v7.0.0&lt;/code&gt;, and I hope that you are too.&lt;br&gt;
Thank you to all of our users for your support and feedback, and I look forward to continuing to improve and develop sweet-alert in the future.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/realrashid/sweet-alert/"&gt;Repo &lt;/a&gt;&lt;br&gt;
&lt;a href="https://realrashid.github.io/sweet-alert/"&gt;Documentation &lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>sweetalert2</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to use SweetAlert2 with Livewire</title>
      <dc:creator>Rashid Ali</dc:creator>
      <pubDate>Wed, 17 Feb 2021 18:01:58 +0000</pubDate>
      <link>https://dev.to/realrashid/how-to-use-sweetalert2-with-livewire-56i6</link>
      <guid>https://dev.to/realrashid/how-to-use-sweetalert2-with-livewire-56i6</guid>
      <description>&lt;p&gt;I got too many requests for adding confirmation alerts feature to &lt;a href="https://github.com/realrashid/sweet-alert"&gt;realrashid/sweet-alert&lt;/a&gt; package this &lt;a href="https://github.com/realrashid/sweet-alert/issues/57"&gt;realrashid/sweet-alert/issues/57&lt;/a&gt; is one of the earliest request for adding confirmation alerts feature but unfortunately i haven't added this feature yet because i haven't found the best way to achieve this.&lt;/p&gt;

&lt;p&gt;So Today I found an easy way to do this without adding the support for this feature in &lt;a href="https://github.com/realrashid/sweet-alert"&gt;realrashid/sweet-alert&lt;/a&gt; package with the help of &lt;a href="https://laravel-livewire.com/"&gt;Livewire&lt;/a&gt; 🎉&lt;/p&gt;

&lt;p&gt;So without any further due Let's Begin 🔥&lt;/p&gt;

&lt;p&gt;First Install the &lt;a href="https://github.com/realrashid/sweet-alert"&gt;realrashid/sweet-alert&lt;/a&gt; package in your project if not installed yet 😢&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require realrashid/sweet-alert
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then configure the package.&lt;/p&gt;

&lt;p&gt;Include &lt;code&gt;'sweetalert::alert'&lt;/code&gt; view in master layout&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'sweetalert::alert'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and run the below command to publish the package assets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan sweetalert:publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yahoooooooo You Have Successfully Installed &lt;a href="https://github.com/realrashid/sweet-alert"&gt;realrashid/sweet-alert&lt;/a&gt; 😉&lt;/p&gt;

&lt;p&gt;For more info checkout the documentation.&lt;br&gt;
&lt;a href="https://realrashid.github.io/sweet-alert"&gt;sweet-alert/documentation&lt;/a&gt; 📘&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You have to enable &lt;code&gt;SWEET_ALERT_ALWAYS_LOAD_JS&lt;/code&gt; in your &lt;code&gt;.env&lt;/code&gt; file!&lt;/p&gt;

&lt;p&gt;Like this &lt;code&gt;SWEET_ALERT_ALWAYS_LOAD_JS=true&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Congratulations now you can use the &lt;a href="https://github.com/realrashid/sweet-alert"&gt;realrashid/sweet-alert&lt;/a&gt; package with &lt;a href="https://laravel-livewire.com/"&gt;Livewire&lt;/a&gt; 🎉 🎉&lt;/p&gt;

&lt;p&gt;Now let's install the &lt;a href="https://laravel-livewire.com/"&gt;Livewire&lt;/a&gt; then we go further 😎 .&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require livewire/livewire
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Include the JavaScript (on every page that will be using Livewire).&lt;/p&gt;

&lt;p&gt;In our case this is our master layout there we included &lt;code&gt;@include('sweetalert::alert')&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="mf"&gt;...&lt;/span&gt;
    &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;livewireStyles&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="mf"&gt;...&lt;/span&gt;

    &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'sweetalert::alert'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;livewireScripts&lt;/span&gt;
    &lt;span class="c1"&gt;// Don't forget the stack tag!&lt;/span&gt;
    &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nf"&gt;stack&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'scripts'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's create a Livewire ConfirmAlert component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan make:livewire ConfirmAlert 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running this above command will generate the following two files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/Http/Livewire/ConfirmAlert.php&lt;/span&gt;
&lt;span class="c1"&gt;// resources/views/livewire/confirm-alert.blade.php&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's first start with &lt;code&gt;app/Http/Livewire/ConfirmAlert.php&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;App\Http\Livewire&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Livewire\Component&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Contact&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ConfirmDelete&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Component&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cd"&gt;/**
     * Contact Id
     *
     * @var [inf]
     */&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nv"&gt;$contactId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="cd"&gt;/**
     * Render the confirm-alert button
     * @return view
     * @author Rashid Ali &amp;lt;realrashid05@gmail.com&amp;gt;
     */&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'livewire.confirm-delete'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="cd"&gt;/**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     * @author Rashid Ali &amp;lt;realrashid05@gmail.com&amp;gt;
     */&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$contactId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Contact&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$contactId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now Let's edit the component view!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- resources/views/livewire/confirm-alert.blade.php --&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn btn-danger"&lt;/span&gt; &lt;span class="na"&gt;wire:click=&lt;/span&gt;&lt;span class="s"&gt;"$emit('triggerDelete',{{ $contactId }})"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        Delete
    &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

@push('scripts')
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text/javascript"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DOMContentLoaded&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;triggerDelete&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;contactId&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;Swal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fire&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Are You Sure?&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Conatct record will be deleted!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;warning&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;showCancelButton&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;confirmButtonColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#3085d6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;cancelButtonColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#aaa&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;confirmButtonText&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Delete!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
            &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
         &lt;span class="c1"&gt;//if user clicks on delete&lt;/span&gt;
                &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
             &lt;span class="c1"&gt;// calling destroy method to delete&lt;/span&gt;
                    &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;destroy&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;contactId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
             &lt;span class="c1"&gt;// success response&lt;/span&gt;
                    &lt;span class="nx"&gt;Swal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fire&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Contact deleted successfully!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="nx"&gt;Swal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fire&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
                        &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Operation Cancelled!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
                    &lt;span class="p"&gt;});&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
@endpush
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You did it 🎉&lt;/p&gt;

&lt;p&gt;Now just load the button within your blade.&lt;br&gt;
In my case it is &lt;code&gt;resources/views/contacts/index.blade.php&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;table&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"table table-striped"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;thead&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;....&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&lt;/span&gt; &lt;span class="na"&gt;colspan=&lt;/span&gt;&lt;span class="s"&gt;2&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Actions&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/thead&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;tbody&amp;gt;&lt;/span&gt;
        @foreach($contacts as $contact)
        &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"..."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Edit&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;
                @livewire('confirm-delete', ['contactId' =&amp;gt; $contact-&amp;gt;id])
            &lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
        @endforeach
    &lt;span class="nt"&gt;&amp;lt;/tbody&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it.&lt;/p&gt;

&lt;p&gt;Thank you! 👍&lt;/p&gt;

</description>
      <category>php</category>
      <category>laravel</category>
      <category>livewire</category>
      <category>sweetalert2</category>
    </item>
    <item>
      <title>Laravel SweetAlert</title>
      <dc:creator>Rashid Ali</dc:creator>
      <pubDate>Mon, 22 Apr 2019 20:04:24 +0000</pubDate>
      <link>https://dev.to/realrashid/laravel-sweetalert-36kd</link>
      <guid>https://dev.to/realrashid/laravel-sweetalert-36kd</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dAe9jYhw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2w2r3dv3nveb6hem7ply.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dAe9jYhw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2w2r3dv3nveb6hem7ply.jpg" alt="Laravel SweetAlert"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Laravel SweetAlert 2 is a Laravel package that integrates the popular JavaScript SweetAlert 2 with Laravel. &lt;/p&gt;

&lt;p&gt;Using the package’s Alert facade or alert() helper, you can queue up SweetAlert 2 alerts on the frontend from your controller:&lt;/p&gt;

&lt;p&gt;It so easy to implement and easy to use give a shot and leave your thoughts.&lt;/p&gt;

&lt;p&gt;Install&lt;/p&gt;

&lt;p&gt;To get started with Laravel SweetAlert, &lt;br&gt;
use Composer to add the package to your project's dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require realrashid/sweet-alert
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Alert
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;alert('Title','Lorem Lorem Lorem', 'success');&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;alert()-&amp;gt;success('Title','Lorem Lorem Lorem');&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;alert()-&amp;gt;info('Title','Lorem Lorem Lorem');&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;alert()-&amp;gt;warning('Title','Lorem Lorem Lorem');&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;alert()-&amp;gt;question('Title','Lorem Lorem Lorem');&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;alert()-&amp;gt;error('Title','Lorem Lorem Lorem');&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;alert()-&amp;gt;html('&amp;lt;i&amp;gt;HTML&amp;lt;/i&amp;gt; &amp;lt;u&amp;gt;example&amp;lt;/u&amp;gt;'," You can use &amp;lt;b&amp;gt;bold text&amp;lt;/b&amp;gt;, &amp;lt;a href='//github.com'&amp;gt;links&amp;lt;/a&amp;gt; and other HTML tags ",'success');&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Toast
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;toast('Your Post as been submited!','success','top-right');&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also configure the package’s ToSweetAlert middleware to handle SweetAlert 2 messages during a middleware handler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function someFunction(Request $request)
{
    return redirect('login')-&amp;gt;with('success', 'Login Successfully!');
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You should check out the &lt;a href="https://realrashid.github.io/sweet-alert/"&gt;Documentation &lt;/a&gt; to see what methods are available.&lt;br&gt;
You can learn more about this package and check out the source code on GitHub at &lt;a href="https://github.com/realrashid/sweet-alert/"&gt;realrashid/sweet-alert&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Featured On&lt;/p&gt;

&lt;p&gt;
  &lt;a href="https://laravel-news.com/laravel-sweetalert"&gt; &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TSgUnX_x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://laravelvoyager.com/assets/images/featured-on/laravelnews.png"&gt;&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>laravelpackage</category>
      <category>sweetalert</category>
      <category>toast</category>
    </item>
  </channel>
</rss>
