Download the PHP package codezero/flash without Composer

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

Flash Notifications for Laravel

GitHub release Laravel Build Status Code Coverage Code Quality Total Downloads

ko-fi

Flash messages to the session with Laravel.

🧩 Features

✅ Requirements

📦 Install

Laravel will automatically register the ServiceProvider.

🛠 Usage

Somewhere in your views, include the flash notifications partial:

Then you can flash a message to the session in your controllers.

You can also use the facade \CodeZero\Flash\Facades\Flash instead of the flash() helper.

The message will be displayed once on the next page load.

🚨 Notification Levels

You can use the built in notification levels:

Or you can specify a custom level:

🔖 Rendering Notifications

Customize the notification views

If you want to customize the templates, you can publish the views:

You will find the views in resources/views/vendor/flash.

Default views for built in notification levels

A notification will be rendered using a view file which name corresponds with the notification level.

So flash()->success('message') will load a success.blade.php view file.

These views live in resources/views/vendor/flash/notifications.

Default view for custom notification levels

If no corresponding file can be found in the package's view folder, then the default.blade.php view file will be used.

So flash()->notification('message', 'custom') will load the default.blade.php view file.

This view lives in resources/views/vendor/flash/notifications.

Add views for custom notification levels

To add view files for custom levels, create them in resources/views/vendor/flash/notifications.

Override default notification views

You can override the view file to be used when you flash a notification:

The specified view name is relative to your app's view folder resources/views.

Access notification values in a view

Notification views will have a $notification variable which is an instance of \CodeZero\Flash\Notification.

This gives you access to:

🔧 Create Your Own Custom Flash Class

If you don't want to use the built in notification levels and want to create your own, you can extend the \CodeZero\Flash\BaseFlash class.

Then change the flash binding in the register method of your app/Providers/AppServiceProvider:

⚙️ Publish Configuration File

You will now find a flash.php file in the config folder.

🚧 Testing

☕️ Credits

🔓 Security

If you discover any security related issues, please e-mail me instead of using the issue tracker.

📑 Changelog

A complete list of all notable changes to this package can be found on the releases page.

📜 License

The MIT License (MIT). Please see License File for more information.


All versions of flash with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/session Version ^10.0|^11.0
illuminate/support Version ^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 codezero/flash contains the following files

Loading the files please wait ....