PHPackages                             maximzhurkin/containers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. maximzhurkin/containers

ActiveLibrary[Framework](/categories/framework)

maximzhurkin/containers
=======================

Simple containers structure for Laravel

1.0.4(1y ago)0169MITPHPPHP &gt;=8.1

Since Sep 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/maximzhurkin/containers)[ Packagist](https://packagist.org/packages/maximzhurkin/containers)[ Docs](https://github.com/maximzhurkin/containers)[ RSS](/packages/maximzhurkin-containers/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Laravel Containers Package
==========================

[](#laravel-containers-package)

A package with commands for a convenient Laravel project structure

```
containers
├── Order
│   ├── Actions
│   │   ├── ListOrdersAction.php
│   │   └── ListOrderStatusesAction.php
│   ├── Contracts
│   │   ├── OrderRepositoryContract.php
│   │   └── OrderStatusRepositoryContract.php
│   ├── Data
│   │   ├── Factories
│   │   │   ├── OrderFactory.php
│   │   │   └── OrderStatusFactory.php
│   │   ├── Migrations
│   │   │   ├── 2024_06_14_123402_create_orders_table.php
│   │   │   └── 2024_06_14_135011_create_order_statuses_table.php
│   │   ├── Repositories
│   │   │   ├── OrderRepository.php
│   │   │   └── OrderStatusRepository.php
│   │   └── Seeders
│   │       ├── OrderSeeder.php
│   │       └── OrderStatusSeeder.php
│   ├── Http
│   │   ├── Controllers
│   │   │   ├── OrderController.php
│   │   │   └── OrderStatusController.php
│   │   ├── Requests
│   │   │   ├── StoreOrderRequest.php
│   │   │   ├── StoreOrderStatusRequest.php
│   │   │   ├── UpdateOrderRequest.php
│   │   │   └── UpdateOrderStatusRequest.php
│   │   └── Routing
│   │       ├── OrderRouting.php
│   │       └── OrderStatusRouting.php
│   ├── Models
│   │   ├── Order.php
│   │   └── OrderStatus.php
│   ├── Providers
│   │   ├── OrderProvider.php
│   │   └── OrderStatusProvider.php
│   └── Tests
│       ├── Feature
│       │   ├── OrderTest.php
│       │   └── OrderStatusTest.php
│       └── Unit
│           ├── OrderTest.php
│           └── OrderStatusTest.php
└── User
    └── ...

```

Install
-------

[](#install)

### Install Containers with [composer](https://getcomposer.org/doc/00-intro.md):

[](#install-containers-with-composer)

```
composer require maximzhurkin/containers
```

### Add providers in bootstrap/providers.php:

[](#add-providers-in-bootstrapprovidersphp)

```
use Maximzhurkin\Containers\Providers\ContainerServiceProvider;

return [
    AppServiceProvider::class,
    ContainerServiceProvider::class,
];
```

### Add Containers namespace

[](#add-containers-namespace)

Add autoload psr-4 containers in `composer.json`

```
{
    "autoload": {
            "psr-4": {
                "App\\": "app/",
                "Containers\\": "containers/",
            }
    }
}
```

And generating optimized autoload files

```
composer dump-autoload
```

### Add tests paths in phpunit.xml

[](#add-tests-paths-in-phpunitxml)

```

        containers/*/Tests/Unit

        containers/*/Tests/Feature

```

Use
---

[](#use)

### Create Container

[](#create-container)

```
php artisan app:container Order
```

*This will create files in containers/Order folder*

### Add created provider to bootstrap/providers.php configuration file

[](#add-created-provider-to-bootstrapprovidersphp-configuration-file)

```
use Containers\Order\Providers\OrderProvider;

return [
    //...
    OrderProvider::class,
];
```

Other commands
--------------

[](#other-commands)

### Create container to exist container

[](#create-container-to-exist-container)

```
php artisan app:container OrderStatus Order
```

### Create controller

[](#create-controller)

```
php artisan app:controller User
```

*containers/User/Http/Controllers/UserController.php*

### Create action

[](#create-action)

```
php artisan app:action User
```

*containers/User/Actions/UserAction.php*

Warning

Specify the name of the entity so that the repository takes the correct name, then rename it to a specific action.

### Create factory

[](#create-factory)

```
php artisan app:factory User
```

*containers/User/Data/Factories/UserFactory.php*

### Create migration

[](#create-migration)

```
php artisan app:migration User
```

*containers/User/Data/Migrations/202406141352\_create\_users\_table.php*

### Create seeder

[](#create-seeder)

```
php artisan app:seeder User
```

*containers/User/Data/Seeders/UserSeeder.php*

### Create model

[](#create-model)

```
php artisan app:model User
```

*containers/User/Models/User.php*

### Create provider

[](#create-provider)

```
php artisan app:provider User
```

*containers/User/Providers/UserProvider.php*

### Create repository

[](#create-repository)

```
php artisan app:repository User
```

*containers/User/Contracts/UserRepositoryContract.php*

*containers/User/Data/Repositories/UserRepository.php*

### Create request

[](#create-request)

```
php artisan app:request User
```

*containers/User/Http/Requests/UserRequest.php*

### Create routing

[](#create-routing)

```
php artisan app:routing User
```

*containers/User/Http/Routing/UserRouting.php*

### Create test

[](#create-test)

```
php artisan app:test User
```

*containers/User/Tests/Feature/UserTest.php*

*containers/User/Tests/Unit/UserTest.php*

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance46

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~126 days

Total

3

Last Release

415d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4610547?v=4)[maxzhurkin](/maintainers/maxzhurkin)[@maxzhurkin](https://github.com/maxzhurkin)

---

Top Contributors

[![maximzhurkin](https://avatars.githubusercontent.com/u/20174706?v=4)](https://github.com/maximzhurkin "maximzhurkin (46 commits)")

---

Tags

laravelstructurecommandscontainers

### Embed Badge

![Health badge](/badges/maximzhurkin-containers/health.svg)

```
[![Health](https://phpackages.com/badges/maximzhurkin-containers/health.svg)](https://phpackages.com/packages/maximzhurkin-containers)
```

###  Alternatives

[artem-schander/l5-modular

Modular pattern generator for Laravel

223241.9k](/packages/artem-schander-l5-modular)[hemp/presenter

Easy Model Presenters in Laravel

247616.4k1](/packages/hemp-presenter)[rahulalam31/laravel-abuse-ip

Block ip address of all spammer's around the world.

27235.6k](/packages/rahulalam31-laravel-abuse-ip)[rcv/core

Enterprise-Grade Modular Architecture for Laravel Applications - A powerful Laravel package that revolutionizes application development with robust Service Repository Pattern, Dynamic Module Management, and 50+ Artisan commands for scalable, maintainable applications.

131.4k](/packages/rcv-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
