Download the PHP package mayankjanidev/alert without Composer

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

Alert For Laravel

Create customizable UI alerts in Laravel.

Requirements

Installation

Install the package via Composer:

Basic Usage

Show the alert using the blade component:

Customize the alert message:

alert_message

Add a title to your alerts (optional):

alert_message_with_title

Config

Though completely optional, you can publish the config file to customize the below settings:

Styling

This package does not depend on any external css or js and should work out of the box without any setup. However, you can customize the default design by publishing the views.

TailwindCSS

If you already have TailwindCSS installed, this package provides Tailwind specific design.

Update the config to switch to Tailwind.

Also add the path to the tailwind config so it does not purge the classes when building the app.css file.

You can also customize Tailwind design by publishing its views:

Alert Types

Currently, 4 types are supported: info, success, warning and failure. Use them like:

alert_message_info alert_message_success alert_message_warning alert_message_failure

Custom Alert Types

Use the custom() method to create your own alert types.

Make sure to create the appropriate view file at resources.views.vendor.alert.components.danger

Model Alerts

Managing alerts for model specific events like created, updated and deleted throughout your app can feel repetitive. Use the model() method to automatically manage that.

This will output "Post was updated.".

alert_model_updated

Similar messages will be shown for the created and deleted events. It will automatically detect the state of your model.

Customize text for model alerts

Publish the lang file and customize it to your liking.

You can also override text for specific models:

Title is also supported for alert models:

Custom actions for model alerts

If you performed a custom action on a model other than create, update or delete, then you can specify it using the action() method.

Custom lang parameters

Lang parameters are autofilled if the model has the attribute with the same name. You can still manually specify lang parameters using the lang() method.

Custom Entity Alerts

If you want the same features of a model alert on a custom entity, use the for() method.

All the model alert features like lang files, custom actions and lang parameters behave the same way for custom entity alerts.

Meta Data

You can add additional meta data to an alert. Good use cases could be links.

JS Frameworks

Though this package does not supply any js components for frameworks like vue or react, you can still use the alert data to build your own component.

Use the json() method to get the current alert data in a json object.

License

This package is released under the MIT License.


All versions of alert with dependencies

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

Loading the files please wait ....