Download the PHP package joselfonseca/laravel-tactician without Composer

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

Laravel Tactician

Laravel Tactician in an implementation of the Command Bus Tactician by Ross Tuck.

Build Status Code Coverage Total Downloads Scrutinizer Code Quality SensioLabsInsight

Installation

To install this update your composer.json run composer require joselfonseca/laravel-tactician

>= laravel5.5

ServiceProvider will be attached automatically.

Other

Once the dependencies have been downloaded, add the service provider to your config/app.php file:

You are done with the installation!

Usage

To use the command bus you can resolve the bus from the laravel container like so:

Or you can inject it into a class constructor:

Once you have the bus instance you can add your handler for the command to be dispatched:

Now you can dispatch the command with the middleware:

You can map the input data array of the Command's constructor with a plain list of arguments or the array itself. For example:

Of course, you can use default values!

For more information about the usage of the tactician command bus please visit http://tactician.thephpleague.com/.

Example

Check out this example of the package implemented in a simple create order command https://gist.github.com/joselfonseca/24ee0e96666a06b16f92.

Bindings

You can configure the bindings for the locator, inflector, extractor and default bus by publishing the config file like so:

Then you can modify each class name and they will be resolved from the laravel container:

Generators

You can generate Commands and Handlers automatically using artisan:

This will create FooCommand and FooHandler and place them in the app/Commands folder, please note that the words Command and Handler will be added to the class names respectively, so in the avobe example the clases created will be FooCommand and FooHandler.

To run both at once:

Middleware included

Laravel tactician includes some useful middleware you can use in your commands.

Change log

Please see the releases page https://github.com/joselfonseca/laravel-tactician/releases

Tests

To run the tests in this package, navigate to the root folder of the project and run:

Then

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email jose at ditecnologia dot com instead of using the issue tracker.

Credits

License

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


All versions of laravel-tactician with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
league/tactician Version 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 joselfonseca/laravel-tactician contains the following files

Loading the files please wait ....