Download the PHP package usernotnull/tall-toasts without Composer

On this page you can find all versions of the php package usernotnull/tall-toasts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tall-toasts

# Beautiful Notification Toasts For Laravel & Livewire A Toast global that can be called from the backend (via Controllers, Blade Views, Components) or frontend (JS, Alpine Components) to render customizable toasts. Runs with the TALL stack: [Laravel](https://laravel.com/docs/10.x/installation), [TailwindCSS](https://tailwindcss.com/docs/guides/laravel), [Livewire](https://laravel-livewire.com/docs/2.x/installation), [AlpineJS](https://alpinejs.dev/essentials/installation). [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/usernotnull/tall-toasts?label=release&sort=semver&style=plastic)](https://github.com/usernotnull/tall-toasts/releases) [![Build size Brotli](https://img.badgesize.io/usernotnull/tall-toasts/main/dist/js/tall-toasts.js.svg?compression=brotli&style=plastic&color=green&label=JS%20size)](https://github.com/usernotnull/tall-toasts/blob/main/dist/js/tall-toasts.js) [![Scrutinizer Score](https://img.shields.io/scrutinizer/g/usernotnull/tall-toasts.svg?style=plastic&label=scrutinizer%20score)](https://scrutinizer-ci.com/g/usernotnull/tall-toasts) [![Codacy branch grade](https://img.shields.io/codacy/grade/0c6b4f96ac2a4a6cbf265f5e825a3fd2/main?style=plastic)](https://www.codacy.com/gh/usernotnull/tall-toasts/dashboard?utm_source=github.com&utm_medium=referral&utm_content=usernotnull/tall-toasts&utm_campaign=Badge_Grade) [![Codecov branch](https://img.shields.io/codecov/c/github/usernotnull/tall-toasts/main?style=plastic)](https://app.codecov.io/gh/usernotnull/tall-toasts) Light | Dark ------------ | ------------- ![toast-light](/.github/images/light.gif) | ![toast-dark](/.github/images/dark.gif)

Featured On

Laravel News     madewithlaravel     Laravel News Podcast

Why

If you are building a web app with the TALL stack, you must choose this library over the other outdated libraries available:

Size does matter

Since the frontend is a pure AlpineJS component with no reliance on external JS libs, and since the backend handles most of the logic, the javascript footprint is tiny (less than ONE kilobyte!) .

The CSS footprint is also negligible as it uses the default TailwindCSS classes. Even if you override the default views, you will rest assured that Tailwind's purging will only keep the styles/classes you have used.

In plain English, it will not bloat your generated JS/CSS files nor add extra files to download as when using other JS libs!

Takes advantage of all the niceties that come with TALL

You can call it from anywhere! Memorize Toast for the frontend and toast() for the backend.

See the usage section for examples.

Customizable

You have control over the view: As you are overriding the blade view, you'll be able to shape it as you like using TailwindCSS classes.

No more messing with custom CSS overrides!

Usage

From The Frontend

From The Backend

You can call the above toast helper from controllers, blade views, and components.

Support Me

I plan on developing many open-source packages using the TALL stack.
Consider supporting my work by tweeting about this library or by contributing to this package.

Check out the list of other packages I built for the TALL stack Other Packages.
To stay updated, follow me on Twitter.

Requirements

Dependency Version
PHP ^8.0
Laravel ^8.0 | ^9.0 | ^10.0 | ^11.0
TailwindCSS ^2.0 | ^3.0
Livewire ^2.0 | ^3.0 (as of tall-toasts v2)
AlpineJS ^3.0

You can find the older v1 documentation here

Installation

You can install the package via Composer:

Setup

TailwindCSS

Build your CSS as you usually do, ie

Usage With Tailwind JIT

If you are using Just-in-Time Mode, add these additional lines into your tailwind.config.js file:

This way, Tailwind JIT will include the classes used in this library in your CSS.

As usual, if the content of tailwind.config.js changes, you should re-run the npm command.

Registering Toast with AlpineJS

Add the Toast component in your app.js:

Add <livewire:toasts /> as high as possible in the body tag, ie:

To properly dispatch toasts from inside your livewire components, add the trait:

That's it! 🎉

RTL Support

The default layout now supports RTL.

As per TailwindCSS docs on RTL support:
Always set the direction, even if left-to-right is your default.

Customization

The toasts should look pretty good out of the box. However, we've documented a couple of ways to customize the views and functionality.

Configuration

You can publish the config file with:

These are the default contents of the published config file:

Customizing views

You can publish and change all views in this package:

The published views can be found and changed in resources/views/vendor/tall-toast/.

The published files are:

Text Sanitization

The content view displays the title and message with x-html. This is fine since the backend sanitizes the title and message by default.

⚠️ If you wish to skip sanitization in order to display HTML content, such as bolding the text or adding <br> to go to the next line, you will call doNotSanitize() as seen in the usage section. In such case, make sure no user input is provided!

Troubleshooting

Make sure you thoroughly go through this readme first!

If the checklist below does not resolve your problem, feel free to submit an issue. Make sure to follow the bug report template. It helps us quickly reproduce the bug and resolve it.

The toasts show multiple times only after refresh

The toasts won't show

The toasts show but look weird

Other Packages

To stay updated, follow me on Twitter.

Testing

This package uses PestPHP to run its tests.

Contributing

This package has 3 GitHub Workflows which run sequentially when pushing PRs:

When pushing PRs, it's a good idea to do a quick run and make sure the workflow checks out, which saves time during code review before merging.

To facilitate the job, you can run the below command before pushing the PR:

Please see CONTRIBUTING for details.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Versioning

This project follows the Semantic Versioning guidelines.

Security Vulnerabilities

As per security best practices, do not call doNotSanitize() on a toast that has user input in its message or title!

Please review the security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see the license file for more information.


All versions of tall-toasts with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1
illuminate/contracts Version ^8.15 || 9.0 - 9.34 || ^9.36 || ^10.0|^11.0
spatie/laravel-package-tools Version ^1.16
livewire/livewire Version ^v3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package usernotnull/tall-toasts contains the following files

Loading the files please wait ....