Download the PHP package goomcoom/laravel-messages without Composer

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

Laravel Messages

Sometimes you may wish to return responses with some extra messages informing the user of what happened. This package provides a fluent interface to add messages from anywhere within in your code base and gracefully add them to your JSON responses.

Installation

Install the package using composer.

The service provider and facade are registered automatically, but you may do so manually by adding them to the app config.

Config

To publish the config file you may use the following command

The config file holds the bags that are available for accepting messages which are fully customizable.

Adding messages to responses

If you would like the messages to the added to the response automatically, you may use the AddMessagesToResponse middleware. The middleware checks if there are any messages and adds them to the response's meta content. For information on using middleware please refer to the official documentation.

The middleware also checks if the response has a message property and appends the message to the meta.messages.error array.

Adding messages

The first argument is the message bag that the messages are meant to be added to. We use the splat operator to gather messages, so you may add multiple comma-separated messages at once.

It's worth noting that messages are not duplicated within a category.

Getting a bag

The package uses laravel's MessageBag class to categorise the messages. You may retrieve a specific bag using the getBag method.

Getting all messages

You may also retrieve all the messages as an associative array with the messages grouped by their category by using the getAll method.

Checking if any messages have been added

You may check if any messages have been added by using the hasAny method.

Removing messages

You may remove messages from a specific bag by using the remove method.

Resetting all message bags

You may reset all message bags by calling the reset method.


All versions of laravel-messages with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
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 goomcoom/laravel-messages contains the following files

Loading the files please wait ....