Download the PHP package andrebhas/laravel-brick without Composer

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

๐Ÿงฑ Laravel Brick

Build modular Laravel applications with a solid foundation. Each module is an independent, self-contained unit (a "brick") that can be composed into robust, scalable applications using Domain-Driven Design principles.

"Each module is a brick. Stack them wisely."

PHP Laravel Tests


โœจ Features

Feature Description
๐Ÿ— Modular Core Create isolated modules with a standard DDD structure
๐ŸŒ‰ Internal Bridge Optional typed, validated cross-module communication
โšก Async Calls Dispatch bridge calls to queues, poll results by job ID
๐Ÿ›ก Circuit Breaker Protect against cascading failures (closed/open/half-open)
๐Ÿ”— Middleware Pipeline Logging, circuit breaker, caching per bridge call
๐Ÿงช Pest Testing Auto-generate test scaffolding with every module
๐Ÿ“ฆ Module Dependencies Modules declare dependencies; enable/disable with checks
โš™๏ธ Per-Module Config Each module has its own Config/config.php
๐ŸŽจ Asset Publishing Copy or symlink module assets to public/bricks/
๐Ÿš€ Octane Compatible No static state; fully safe for Laravel Octane

๐Ÿ“‹ Requirements


๐Ÿ“ฆ Installation

The package uses Laravel's auto-discovery. The service provider is registered automatically.

Publish Configuration

Publish Stubs (optional, to customise scaffolding)


๐Ÿ—‚ Module Structure

Layer-Driven Architecture (Default)

After running php artisan brick:make, each module follows this structure:

Feature-Driven Architecture

If you prefer to organizer your module by business features rather than technical layers, you can use the --features flag (or answer yes during the interactive prompt). This replaces the Actions directory with a Features directory:


๐Ÿš€ Quick Start

1. Create a Module

Interactive flow:

Or non-interactively:

2. Register the Module's Namespace

Add to composer.json:

Then regenerate autoload:

3. Enable the Module

4. Run Migrations


๐Ÿ“„ Module Manifest (module.json)


๐ŸŒ‰ Bridge: Cross-Module Communication

1. Implement the Bridge

2. Synchronous Call (from another module)

3. Asynchronous Call

4. Generate Bridge for Existing Module


๐Ÿ›ก Circuit Breaker

The circuit breaker prevents cascading failures when a module's bridge is unreliable.

States

Configuration (config/brick.php)

Status Command

Manual Reset


๐Ÿงช Testing

Package Tests

Module Tests (Pest)

Each generated module includes its own tests directory with Pest setup:

Testing Helpers

BridgeFake โ€“ Mock bridge calls in tests

CircuitBreakerFake โ€“ Simulate circuit states

Generate Test File


๐ŸŽฎ Artisan Commands Reference

Command Description
brick:make Create a new module interactively
brick:make-feature {module} {feature} Scaffold a full feature (Action, Request, etc)
brick:make-action {module} {name} Generate an Action class
brick:make-request {module} {name} Generate a FormRequest class
brick:make-response {module} {name} Generate a Response/Resource class
brick:make-job {module} {name} Generate a specific Job
brick:make-event {module} {name} Generate an Event
brick:make-listener {module} {name} Generate a Listener
brick:make-bridge {module} Generate bridge for a module
brick:make-test {module} {name} Generate a Pest test file
brick:bridge:status Show circuit breaker status for all bridges
brick:enable {module} Enable a module (checks dependencies)
brick:disable {module} Disable a module (checks dependents)
brick:publish-assets {module?} Publish module assets to public/
brick:migrate {module} Run module migrations
brick:rollback {module} Rollback module migrations
brick:refresh {module} Refresh (rollback + re-run) module migrations
brick:seed {module} Run module seeders

Command Options


โš™๏ธ Configuration Reference

Environment Variables

Variable Default Description
BRICK_BRIDGE_ENABLED true Enable/disable the bridge globally
BRICK_BRIDGE_QUEUE default Queue for async bridge calls
BRICK_BRIDGE_CACHE null Cache store for circuit breaker & async results
BRICK_ASSETS_METHOD copy Asset publishing method (copy or symlink)
BRICK_AUTO_ENABLE_DEPENDENCIES false Auto-enable missing dependencies

๐Ÿ”ง Adding Custom Middleware

Create a middleware class:

Register in config/brick.php:


๐Ÿงฉ Module Dependencies

Declare dependencies in module.json:

When enabling:


โœ… Compatibility Notes

Package Notes
Spatie Media Library Use HasMedia trait directly in module models
Laravel Socialite Place OAuth controllers in Auth module's Http/Controllers/
Laravel Passport Register Passport in Auth module's service provider
Laravel Telescope Automatically captures all bridge calls via logging middleware
Laravel Debugbar No conflicts; bridge calls appear in the timeline
Laravel Octane Fully safe โ€“ no static state anywhere in the package

๐Ÿ“ Package Structure


๐Ÿค Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Write tests for your changes
  4. Run the test suite: composer test
  5. Submit a pull request

๐Ÿ“œ License

The MIT License (MIT). See LICENSE for details.


"Each module is a brick. Stack them wisely." โ€” andrebhas/laravel-brick


All versions of laravel-brick with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/console Version ^9.0|^10.0|^11.0|^12.0
illuminate/cache Version ^9.0|^10.0|^11.0|^12.0
illuminate/queue Version ^9.0|^10.0|^11.0|^12.0
illuminate/filesystem Version ^9.0|^10.0|^11.0|^12.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0
illuminate/routing Version ^9.0|^10.0|^11.0|^12.0
illuminate/log Version ^9.0|^10.0|^11.0|^12.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 andrebhas/laravel-brick contains the following files

Loading the files please wait ...