Sweetalert and Toaster notifications for Laravel livewire with support for tailwind and bootstrap.

Related tags

Laravel larabell
Overview

Larabell

Integrate livewire with sweetalert.

Installation

composer require simtabi/larabell

How to use

1. Add LarabellServiceProvider in config/app.php

    ...
    \Simtabi\Larabell\LarabellServiceProvider::class
    ...

2. Include javascript

    ...
    // place this directive in the header
    @larabellCss

    // no need to call this, as it has already been called when you call @larabellScripts
    @larabellInit
    ...

3. Extra config file

Publish the configs: php artisan vendor:publish --tag=larabell:assets. Publish the configs: php artisan vendor:publish --tag=larabell:config. Publish the configs: php artisan vendor:publish --tag=larabell:views.

See available configuration


Building toasts and sweetalerts

To make it easy to build toasts and sweetalerts, we have implemented chained methods to help you with building

Sweetalert

In your component add Toast trait. Then call toast method whenever you want.

use Simtabi\Larabell\HasLarabell;
use Livewire\Component;

class MyComponent extends Component
{
    use HasLarabell;

    public function save() {
        $this->fireSweetalertModal();
    }

}

sweetalert parameters:

  • title
  • icon: success, error, warning, info, question - default is info
  • timeout: in milliseconds, default is 5000

Toast

This is the normal sweetalert modal. In your component add Fire trait. Then call fire method whenever you want.

use Simtabi\Larabell\HasLarabell;
use Livewire\Component;

class MyComponent extends Component
{
    use HasLarabell;

    public function save() {
        $this->fireToastNotification();
    }

}

toast parameters:

Refer to the documentation online at: https://github.com/kamranahmedse/jquery-toast-plugin


Credits

You might also like...
Dynamic Laravel Livewire Bootstrap toasts.

Laravel Livewire Toasts This package allows you to dynamically show Bootstrap toasts via Laravel Livewire components. Documentation Requirements Insta

Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire.
Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire.

bastinald/ux Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire. Features Automatic migrations Automatic routing Automatic passwo

A Laravel starter kit with auth scaffolding using Livewire & Bootstrap.

Zephyr This package is a Laravel starter kit with auth scaffolding using Livewire & Bootstrap. It was created for people who prefer using Livewire & B

Nebula is a minimalistic and easy to use administration tool for Laravel applications, made with Laravel, Alpine.js, and Tailwind CSS.

Nebula Nebula is a minimalistic and easy to use administration tool for Laravel applications, made with Laravel, Alpine.js, and Tailwind CSS. Nebula m

Laravel 5 Flash Notifications with icons and animations and with a timeout

Notify (Laravel) Notify alert boxes to the browser with sound and font awesome icons and give it a timeout to fly out. Works great to notify the user

Twitter clone project being developed by using PHP Laravel Framework and tailwind.css
Twitter clone project being developed by using PHP Laravel Framework and tailwind.css

Twits! About Twits! We, as enthusiastic learners and new developers, kicked of this project in order to improve our skills and capabilities in PhP Lar

A simple blog app where a user can signup , login, like a post , delete a post , edit a post. The app is built using laravel , tailwind css and postgres

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Laravel Authentication Log is a package Log user authentication details and send new device notifications.
Laravel Authentication Log is a package Log user authentication details and send new device notifications.

Laravel Authentication Log is a package which tracks your user's authentication information such as login/logout time, IP, Browser, Location, etc. as well as sends out notifications via mail, slack, or sms for new devices and failed logins.

This package wraps up the standalone executable version of the Tailwind CSS framework for a Laravel application.

Tailwind CSS for Laravel Introduction This package wraps the standalone Tailwind CSS CLI tool. No Node.js required. Inspiration This package was inspi

Owner
Simtabi
Simtabi
A TALL (Tailwind CSS, Alpine.js, Laravel and Livewire) Preset for Laravel

Laravel TALL Preset A front-end preset for Laravel to scaffold an application using the TALL stack, jumpstarting your application's development. If yo

Laravel Frontend Presets 1.8k Jan 7, 2023
It's like React for PHP. Powered by Laravel, Livewire, Tailwind, & Alpine.

Tailwire It's like React for PHP. Powered by Laravel, Livewire, Tailwind, & Alpine. Features: Use a custom view component class namespace Declare rout

null 5 Dec 12, 2021
Aplicación Laravel-Livewire-Tailwind. La aplicación se conecta a APIRest y muestra resultados, búsquedas, historial, Responsive Design

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Juan Gómez 0 Feb 10, 2022
Livewire UI components with tailwind base style

WireUI ?? Documentation Wire UI is a library of components and resources to empower your Laravel and Livewire application development. Starting a new

WireUi 811 Jan 2, 2023
Livewire Notifier is a simple notifications system with zero dependencies above TALL-stack

Livewire Notifier is a simple notifications system with zero dependencies above TALL-stack (Tailwind CSS, Alpine.JS, Laravel and Livewire).

CodeSPB 18 Jul 27, 2022
🔌 Convert Bootstrap CSS code to Tailwind CSS code

Tailwindo This tool can convert Your CSS framework (currently Bootstrap) classes in HTML/PHP (any of your choice) files to equivalent Tailwind CSS cla

Awssat 938 Dec 24, 2022
Laravel-comments-livewire - Livewire components for the laravel-comments package

Associate comments and reactions with Eloquent models This package contains Livewire components to be used with the spatie/laravel-comments package. S

Spatie 15 Jan 18, 2022
Laravel Livewire form component with declarative Bootstrap 5 fields and buttons.

Laravel Livewire Forms Laravel Livewire form component with declarative Bootstrap 5 fields and buttons. Requirements Bootstrap 5 Installation composer

null 49 Oct 29, 2022
Free and open-source Laravel admin dashboard interface built with Livewire & Alpine.js based on Bootstrap 5

Volt Dashboard Laravel Free Frontend Web App for Laravel with Livewire & Alpine.js Never start a development project from scratch again. We've partner

Themesberg 200 Jan 4, 2023
Dynamic Laravel Livewire Bootstrap 5 modals.

Laravel Livewire Modals Dynamic Laravel Livewire Bootstrap 5 modals. Requirements Bootstrap 5 Installation Require the package: composer require basti

null 55 Dec 27, 2022