Download the PHP package jake142/laravel-service without Composer

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

Laravel Service

A package to divide Laravel into smaller services. Then main goal of this package is:

  1. Readable, the code is split into services
  2. Scalable, run services as needed
  3. Faster development, split work between developers

Installation

Simply run:

composer require jake142/laravel-service

Usage

Start by running

php artisan laravel-service:make

This will start a setup wizard where you define:

  1. The name of the service
  2. The version of the service (eg. V1)
  3. If you want a sample controller (recommended)
  4. If you want a sample job (recommended)
  5. If you want a sample test (recommended)

The service is now created (added as a repository to your composer.json file), but not enabled.

Enable a service

To enable a service run:

php artisan laravel-service:enable laravel-service/$version-$service (eg. laravel-service/v1-sampleservice)

This will enable the service which means:

  1. Composer runs require on your service
  2. The tests will be added to the phpunit.xml and therefore able to run with the phpunit command

Disable a service

To disable a service run:

php artisan laravel-service:disable laravel-service/$version-$service (eg. laravel-service/v1-sampleservice)

This will disable the service which means:

  1. Composer runs remove on your service
  2. The tests will be removed from the phpunit.xml

List services and their status

php artisan laravel-service:list

Generic Queues and Jobs

To call the generic queue:

To run the generic job:

Config

You can either use vendor:publish to publish the config files for each service or you can publish the laravel-service config file which will get updated when you add new configs to a service. If you use the laravel-service config file you access the config values as following:

Generating OpenAPI docs

php artisan laravel-service:generate-docs {service/all} {constants?}

The docs will be generated in the storage folder: storage/app/laravel-service/v1-sampleservice/docs/swagger.json.

If you use all instead of a service all laravel-services will be used in the docs generation and the file be placed in storage/app/laravel-service/docs/swagger.json

Constants is the path to the config where you store your constants. Eg. swagger.constants will read all constants in the config file swagger and the parameter constants.

Credits to swagger-php

Using readme.com? Need to use swagger feature allOf? Then you can use:

artisan laravel-service:generate-docs {service/all} {constants?} --workaround-readme

Release note

Version 3.0.6 -> Version 3.0.9 Updated swagger dependency.

Version 3.0.5 Removed dev-master from composer install.

Version 3.0.4 Made changes to the generic queues.

Version 3.0.3 Special support for readme.com to support swagger features.

Version 3.0.2 Enabled all services for open api doc generation.

Version 3.0.1 Added constants to open api doc generation.

Version 3.0.0 Now with open api 3.0! Read more below!

Version 0.2.9 Fixed bug in GenericQueue where job was not deleted from queue when processed.

Version 0.2.8 Fixed the bug in 0.2.7 whereas $this->findComposer() is an array in laravel 5.8 and above and a string in laravel 5.7 and below.

Version 0.2.7 Override the deprecated function getProcess of the Composer class to support laravel 5.8 and above.

Version 0.2.6 the dev-master param was added to the composer require command run when you enable a service.

Version 0.2.5 Fixed broken update package command. Now you should be able to run

php artisan laravel-service:update-package

If you have been using version 0.2.2 -> 0.2.4 you will have to fix your composer files and phpunit file manually. Sorry!

Version 0.2.3 service:make command renamed to laravel-service:make.

Version 0.2.2 Due to Composer 2.x more strict naming rules this package has new naming of the services. I have created an artisan upgrade command to make the changes for you. The command will disable all your services and you have to manually enable them when you have run the command.

php artisan laravel-service:update-package

I have also updated all commands with the prefix laravel-service (instead of service as before)

Version 0.2.1 enabled automatic update of service configs. More info below.

Version 0.2.0 includes generic jobs and queues. This is needed so one service can push data on to a queue without knowing about the code in another service job.

Version 0.1.X is a complete rewrite of the package. Version 0.1.X now creates each service as a composer package and uses composer to add it to your project. It is tested in laravel version 5.6. Previous versions are not supported anymore.

PLEASE NOTE

laravel-service will add:

to your composer.json file.


All versions of laravel-service with dependencies

PHP Build Version
Package Version
Requires zircote/swagger-php Version 4.*
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 jake142/laravel-service contains the following files

Loading the files please wait ....