Download the PHP package filippo-toso/laravel-domain-library without Composer

On this page you can find all versions of the php package filippo-toso/laravel-domain-library. 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-domain-library

Why does it exist?

I read the Laravel Beyond CRUD series and decided this is the way. But I'm a lazy coder: I really don't like to write a lot of code. So, I needed a toolkit to automate as much coding as possible. And here it is!

Requirements

Laravel 11 support

I'm a little busy in this period. Laravel 11 has some critical changes that impact this package. In the next few days I'll try to find the time to make a new major release with full support for Laravel 11.

What it does?

It provides:

The commands prefix is domain:.

How does it work?

Let's start with a clean Laravel installation. From your favorite shell:

Then install the library:

The additional Spatie's packages are required for data transfer objects, model states, query builders and view models.

Now the fun part... First, we are going to build the domain structure:

This command will create a new src folder that will contain 3 namespaces App, Domain and Support. It will also rewire the Laravel application to work with this new directory structure (ie. moving middlewares and providers, updating the bootstrap code, introducing a new Application class, and so on).

At this point you can start building your domain driven application. Let's create the structure for a sample domain named Invoices

Then we will prepare the administrative application part for this domain:

Making domain classes

With this library you can make the following classes:

All the commands include a --force option to overwrite existing classes. Please keep in mind that with great power comes great responsibility

Customizing code generation

If you want to customize the generated code, you can publish the stubs and then edit them.

Making models

Making model's states

Making model's subscribers

Making model's events

Making model's subscribers and events

Making model's collections

Making model's query builders

Making data transfer objects

Making HTTP queries

Making view models

Making actions

Making form requests

Making exceptions

Making a suite of classes

This command will create all the classes above in a single sweep:


All versions of laravel-domain-library with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5|^8.0
illuminate/support Version ^9.0|^10.0
nikic/php-parser Version ^4.10
league/flysystem Version ^3.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 filippo-toso/laravel-domain-library contains the following files

Loading the files please wait ....