Download the PHP package godforhire/toast without Composer

On this page you can find all versions of the php package godforhire/toast. 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 toast

Easy toast notifications for your Laravel apps

This composer package offers Bootstrap 5 toast notifications and modals for your Laravel applications.


This package is derived from laracasts/flash


Installation

Begin by pulling in the package through Composer.

Usage

Within your controllers, before you perform a redirect, make a call to the toast() function.

Toast themes follow the Bootstrap contextual classes:

If no class is passed, the default is set to "info".

Except for overlays, toast messages are automatically dismissed after 5 seconds, but if you wish to change this, use the delay method:

Add important() to manually dismiss a toast message:

To render the message as an overlay/modal, use:

You can also add a title:

With this message toasted to the session, you may now display it in your view(s). Because toast messages and overlays are so common, we provide a template out of the box to get you started. You're free to use - and even modify to your needs - this template how you see fit.

In your application template, add the following code to toggle the toast messages/modal:

If you need to modify the toast message partials, you can run:

Please refer to the official Bootstrap 5 documentation for positioning the toast messages: https://getbootstrap.com/docs/5.1/components/toasts/

The two package views will now be located in the resources/views/vendor/toast/ directory.

Multiple Toast Messages

Need to toast multiple toast messages to the session? No problem.

You'll now see three toast messages upon redirect.

You can also mix in an overlay to display both:

If you redirect to another controller and create toast message there, it will be appended to the collection.

Multiple Modal Messages

While it is possible to display multiple modals, they will be stacked on top of each other. This will also result in multiple background overlays, causing the background to increase in darkness with each modal.


All versions of toast with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version ~5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
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 godforhire/toast contains the following files

Loading the files please wait ....