Download the PHP package dandysi/laravel-monorepo without Composer

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

Laravel Monorepo

Actions Status

This package allows you to create a monorepo of related Laravel microservices, that share common libraries and backend services/technologies.

Demo

A demo repository using this package containing three related Laravel microservices.

https://github.com/dandysi-labs/demo-laravel-monorepo

Install

Create Provider

If you intend to use the normal Laravel directory structure:

This will create the file app/Chores/MonorepoProvider.php with the namespace App\Chores

Outside of the normal then you will need to specify the destination directory (this will be relative to the project root):

This will create the file microservices/Chores/MonorepoProvider..php with the namespace Chores

...and update your composer.json autoload paths accordingly:

Next Step

Start writing your code as you normally would, albeit using the monorepo provider to setup the service.

Routes

Add routes as usual (this function will not be called if routes are already cached).

Commands

Register command classes.

Schedules

Events

Register event listeners:

Register event subscribers:

Config

To include isolated config data (this function will not be called if config already cached):

If however you would like to tweak a normal config file further than just updating an environment variable, wrap the existing value(s) in a function call (this must be the base class and the method must end in Config)

...and create a function to perform the modification in the monorepo provider:

Testing

As routes, configs, commands, schedules, events are all isolated, testing is slightly more complicated. However, there is another make command to help. This will generate a test case for you to extend in your tests, effectively setting up the related microservice.

This will create the file microservices/Chores/Tests/TestCase.php with the namespace Chores\Tests and use the Chores\MonorepoProvider class

Using

To use your new microservice, simply update the environment variable MONOREPO_PROVIDER to point to the relevant monorepo provider class:

To quickly run a command, prefix the command with the env

Or serve some routes

Additional Providers

Simply create a new provider and repeat.

License

Open-sourced software licensed under the MIT license.


All versions of laravel-monorepo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.37
illuminate/console Version ^10.37
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 dandysi/laravel-monorepo contains the following files

Loading the files please wait ....