Download the PHP package digitalcloud/eloquent-custom-actions without Composer

On this page you can find all versions of the php package digitalcloud/eloquent-custom-actions. 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 eloquent-custom-actions

Laravel Eloquent Custom Actions.

The package idea inspired from laravel eloquent events functionallity and eloquent scope code style. If you like the Event driven development approach, this package can dramatically clean your model code.

Installation

You can install the package via composer:

Usage Example

Without this package, to simulate the eloquent events, you will end with:

To simplify your User model, declare action{MethodName} method and remove all event related codes, the package will automatically fire before{Method} and after{Method} events when $user->verify($mobile) invoked.

Use dispatchesEvents

As eloquent events, you can map the dispatched events using $dispatchesEvents proparity

Use EventServiceProvider

You can map events to listener as usual in EventServiceProvider, you can use both string event name or the mapped events from the dispatchesEvents:

Use Model Observer

As eloquent observable, you can map the observable events using $observables proparity

and then you cn add beforeVerify and afterVerify functions in the ModelObserver class same as other eloqunt functions.

Stopping The Propagation Of An Event

As mentioned in the Laravel docs:

Sometimes, you may wish to stop the propagation of an event to other listeners. You may do so by returning false from your listener's handle method.

If any before{Action} listener return false the process will be stoped, and the real action will not excute.

Roadmap

We currently working on:


All versions of eloquent-custom-actions with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.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 digitalcloud/eloquent-custom-actions contains the following files

Loading the files please wait ....