PHPackages                             iadewunmi/laravel-porto-sap - 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. iadewunmi/laravel-porto-sap

ActiveLibrary[Framework](/categories/framework)

iadewunmi/laravel-porto-sap
===========================

This package is a solution for easy building and working with Porto pattern structure

00PHP

Since Jun 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ife-adewunmi/laravel-porto-sap)[ Packagist](https://packagist.org/packages/iadewunmi/laravel-porto-sap)[ RSS](/packages/iadewunmi-laravel-porto-sap/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Porto for Laravel
=================

[](#porto-for-laravel)

### For Laravel \[11.x\] please use the latest \[11.0\] version.

[](#for-laravel-11x-please-use-the-latest-110-version)

This is a package who gives flexible way to build a structure of the Porto (Software Architectural Pattern) in your Laravel project. You should no longer to migrate a lot of files and folders handle.

This package will do the job for you in some clicks.

- [Introduction](#Introduction)
- [How to install?](#HowToInstall?)
- [Ship structure](#ShipStructure)
- [Containers](#Containers)
    - [Standard](#Standard)
    - [Default](#Default)
    - [API](#API)
    - [CLI](#CLI)
    - [WEB](#WEB)
    - [Full](#Full)
- [Laravel console commands](#LaravelConsoleCommands)
    - [Make](#Make)
        - [make:cast](#makeCast)
        - [make:channel](#makeChannel)
        - [make:command](#makeCommand)
        - [make:component](#makeComponent)
        - [make:controller](#makeController)
        - [make:enum](#makeEnum)
        - [make:event](#makeEvent)
        - [make:exception](#makeException)
        - [make:factory](#makeFactory)
        - [make:job](#makeJob)
        - [make:listener](#makeListener)
        - [make:mail](#makeMail)
        - [make:middleware](#makeMiddleware)
        - [make:model](#makeModel)
        - [make:notification](#makeNotification)
        - [make:observer](#makeObserver)
        - [make:policy](#makePolicy)
        - [make:provider](#makeProvider)
        - [make:request](#makeRequest)
        - [make:resource](#makeResource)
        - [make:rule](#makeRule)
        - [make:scope](#makeScope)
        - [make:seeder](#makeSeeder)
        - [make:test](#makeTest)
    - [Model](#model)
        - [model:show](#modelShow)
- [Additional console commands](#AdditionalConsoleCommands)
    - [Make](#AdditionalMake)
        - [make:action](#makeAction)
        - [make:config](#makeConfig)
        - [make:contract](#makeContract)
        - [make:helper](#makeHelper)
        - [make:repository](#makeRepository)
        - [make:task](#makeTask)
        - [make:trait](#makeTrait)
        - [make:translation](#makeTranslation)
        - [make:value](#makeValue)

Introduction
============

[](#introduction)

Laravel is a popular and beautiful PHP framework who helps a lot to make your web applications. But web applications tend to grow and become harder to maintain and optimize. Unfortunately, Laravel, like other frameworks, does not have standard tools that allow you to write flexible, readable and easily maintainable code.

Porto (Software Architectural Pattern) is a brilliant solution for building large applications. This pattern helps you and your team to organize and maintain your code.

You can find more information about Porto by this link:

How to install?
===============

[](#how-to-install)

1. First of all you need to install the package:

    ```
    composer require iadewunmi/laravel-porto-sap

    ```
2. Next, you need to enable installed package in your .env file:

    ```
    PORTO_SAP_ENABLED=true

    ```
3. Next, you can install porto structure using this command:

    ```
    php artisan porto:install --container= --container-

    ```

    You need to put directory path when the Porto structure will be installed or you can confirm installation in the default app/ directory.

    Of course, if you put the custom directory path, you need to set it in the autoload -&gt; psr-4 in the composer.json file.

    You also can add directory name of your first container. For example:

    ```
    --container=

    ```

    This container will be installed in the Containers directory with standard structure. You also can force another container structures like:

    ```
    --container-default
    --container-api
    --container-cli
    --container-web
    --container-full

    ```
4. Next, you need to put some changes in the bootstrap/app.php file.

    From:

    ```
     return [
       App\Providers\AppServiceProvider::class,
     ];
    ```
5. That's all.

    Below you can find the skeleton structure of ship, each type of containers and information about adapted laravel console commands.

Ship structure
==============

[](#ship-structure)

This is a skeleton of the installed Ship structure.

```
Ship
    ├── Abstracts
    │   ├── Broadcasting
    │   │   ├── Channel.php
    │   │   ├── PresenceChannel.php
    │   │   └── PrivateChannel.php
    │   │── Commands
    │	│   └── ConsoleCommand.php
    │   ├── Components
    │	│   └── Component.php
    │   ├── Controllers
    │	│   └── Controller.php
    │   ├── Events
    │	│   └── Event.php
    │   ├── Exceptions
    │	│   └── Handler.php
    │   ├── Factories
    │	│   └── Factory.php
    │   ├── Jobs
    │	│   └── Job.php
    │   ├── Mails
    │	│   ├── Mailables
    │	│   │   ├── Content.php
    │	│   │   └── Envelope.php
    │	│   └── Mailable.php
    │   ├── Middleware
    │   │   ├── Authenticate.php
    │   │   ├── EncryptCookies.php
    │   │   ├── PreventRequestsDuringMaintenance.php
    │   │   ├── TrimStrings.php
    │   │   ├── TrustHosts.php
    │   │   ├── TrustProxies.php
    │   │   ├── ValidateSignature.php
    │   │   └── VerifyCsrfToken.php
    │   ├── Models
    │   │   ├── BaseModel.php
    │   │   ├── UserModel.php
    │   │   ├── Pivot.php
    │   │   ├── MorphPivot.php
    │   │   └── Builder.php
    │   ├── Notifications
    │	│   ├── Messages
    │	│   │   └── MailMessage.php
    │   │   └── Notification.php
    │   ├── Policies
    │	│   └── Policy.php
    │   ├── Providers
    │   │   ├── AuthServiceProvider.php
    │   │   ├── ServiceProvider.php
    │   │   ├── EventServiceProvider.php
    │   │   └── RouteServiceProvider.php
    │   ├── Requests
    │   │   ├── Request.php
    │   │   └── FormRequest.php
    │   ├── Responses
    │   │   ├── Response.php
    │   │   ├── RedirectResponse.php
    │   │   └── JsonResource.php
    │   ├── Resources
    │	│   └── ResourceCollection.php
    │   ├── Seeders
    │	│   └── Seeder.php
    │   ├── Tests
    │	│   └── PhpUnit
    │	│       └── TestCase.php
    │   ├── Translations
    │	│   └── PotentiallyTranslatedString.php
    │   └── Views
    │	    └── Component.php
    ├── Broadcasting
    │   ├── Channel.php
    │   ├── PresenceChannel.php
    │   └── PrivateChannel.php
    ├── Commands
    ├── Configs
    ├── Controllers
    │   └── Controller.php
    ├── Events
    │   └── Event.php
    ├── Exceptions
    │   └── Handler.php
    ├── Helpers
    │   └── helper.php
    ├── Kernels
    │   ├── ConsoleKernel.php
    │   └── HttpKernel.php
    ├── Mails
    │   └── Mailables
    │       ├── Envelope.php
    │       └── Content.php
    ├── Middleware
    │   ├── Authenticate.php
    │   ├── EncryptCookies.php
    │   ├── PreventRequestsDuringMaintenance.php
    │   ├── RedirectIfAuthenticated.php
    │   ├── TrimStrings.php
    │   ├── TrustHosts.php
    │   ├── TrustProxies.php
    │   ├── ValidateSignature.php
    │   └── VerifyCsrfToken.php
    ├── Migrations
    ├── Models
    │   ├── Model.php
    │   ├── UserModel.php
    │   ├── Pivot.php
    │   ├── MorphPivot.php
    │   ├── Builder.php
    │   └── Scope.php
    ├── Notifications
    │   ├── Messages
    │   │   └── MailMessage.php
    │   └── Notification.php
    ├── Policies
    │   └── Policy.php
    ├── Providers
    │   ├── AuthServiceProvider.php
    │   ├── BroadcastServiceProvider.php
    │   ├── EventServiceProvider.php
    │   └── RouteServiceProvider.php
    ├── Requests
    │   ├── Request.php
    │   └── FormRequest.php
    ├── Responses
    │   ├── Response.php
    │   └── RedirectResponse.php
    ├── Resources
    │   ├── JsonResource.php
    │   └── ResourceCollection.php
    ├── Seeders
    ├── Tests
    │   └── TestCase.php
    ├── Traits
    │   └── CreatesApplication.php
    └── Translations

```

Containers
==========

[](#containers)

1. Standard
-----------

[](#1-standard)

To create container with necessary files and folders you need to put this command:

```
php artisan make:container

```

Without forced container type will be created standard container structure.

#### Standard Container's Structure

[](#standard-containers-structure)

```
Container
	├── Actions
	├── Tasks
	├── Models
	├── Loaders
	│   ├── AliasesLoader.php
	│   ├── ProvidersLoader.php
	│   └── MiddlewareLoader.php
	└── UI
	    ├── WEB
	    │   ├── Routes
	    │   ├── Controllers
	    │   └── Views
	    ├── API
	    │   ├── Routes
	    │   ├── Controllers
	    │   └── Transformers
	    └── CLI
	        ├── Routes
	        └── Commands

```

2. Default
----------

[](#2-default)

To create container with default route, controller, view and test file you can via command below:

```
php artisan make:container  --default

```

#### Default Container's Structure

[](#default-containers-structure)

```
Container
	├── Actions
	├── Tasks
	├── Models
	├── Loaders
	│   ├── AliasesLoader.php
	│   ├── ProvidersLoader.php
	│   └── MiddlewareLoader.php
	└── UI
	    ├── WEB
	    │   ├── Routes
	    │   │   ├── home.php
	    │   ├── Controllers
	    │   │   ├── HomeController.php
	    │   ├── Views
	    │   │   ├── home.blade.php
	    │   ├── Tests
	    │   │   ├── Functional
	    │   └── └── └── ExampleTest.php
	    ├── API
	    │   ├── Routes
	    │   ├── Controllers
	    │   └── Transformers
	    └── CLI
	        ├── Routes
	        └── Commands

```

3. API
------

[](#3-api)

To create container only for API needles you can via command below:

```
php artisan make:container  --api

```

#### API Container's Structure

[](#api-containers-structure)

```
Container
	├── Actions
	├── Tasks
	├── Models
	├── Loaders
	│   ├── AliasesLoader.php
	│   ├── ProvidersLoader.php
	│   └── MiddlewareLoader.php
	└── UI
	    └── API
	        ├── Routes
	        ├── Controllers
	        └── Transformers

```

4. CLI
------

[](#4-cli)

To create container only for command line interface needles you can via command below:

```
php artisan make:container  --cli

```

#### CLI Container's Structure

[](#cli-containers-structure)

```
Container
	├── Actions
	├── Tasks
	├── Models
	├── Loaders
	│   ├── AliasesLoader.php
	│   ├── ProvidersLoader.php
	│   └── MiddlewareLoader.php
	└── UI
	    └── CLI
	        ├── Routes
	        └── Commands

```

5. WEB
------

[](#5-web)

To create container only for web needles you can via command below:

```
php artisan make:container  --web

```

#### WEB Container's Structure

[](#web-containers-structure)

```
Container
	├── Actions
	├── Tasks
	├── Models
	├── Loaders
	│   ├── AliasesLoader.php
	│   ├── ProvidersLoader.php
	│   └── MiddlewareLoader.php
	└── UI
	    └── WEB
	        ├── Routes
	        ├── Controllers
	        └── Views

```

6. Full
-------

[](#6-full)

To create container with full structure you can via command below:

```
php artisan make:container  --full

```

#### Full Container's Structure

[](#full-containers-structure)

```
Container
	├── Actions
	├── Tasks
	├── Models
	├── Values
	├── Events
	├── Listeners
	├── Policies
	├── Exceptions
	├── Contracts
	├── Traits
	├── Enums
	├── Jobs
	├── Notifications
	├── Providers
	├── Configs
	├── Loaders
	│   ├── AliasesLoader.php
	│   ├── ProvidersLoader.php
	│   └── MiddlewareLoader.php
	├── Mails
	│   └── Templates
	├── Data
	│   ├── Migrations
	│   ├── Seeders
	│   ├── Factories
	│   ├── Criteria
	│   ├── Repositories
	│   ├── Validators
	│   ├── Transporters
	│   └── Rules
	├── Tests
	│   ├── Traits
	│   └── Unit
	└── UI
	    ├── WEB
	    │   ├── Routes
	    │   ├── Controllers
	    │   ├── Requests
	    │   ├── Tests
	    │   │   └── Functional
	    │   └── Views
	    ├── API
	    │   ├── Routes
	    │   ├── Controllers
	    │   ├── Requests
	    │   ├── Tests
	    │   │   └── Functional
	    │   └── Transformers
	    └── CLI
	        ├── Routes
	        ├── Commands
	        └── Tests
	            └── Functional

```

Laravel console commands
========================

[](#laravel-console-commands)

1. Make
-------

[](#1-make)

This is a list of adapted laravel console commands for the Porto.

Without container name some commands will be created class in the Ship.

Other commands require the container name

### make:cast

[](#makecast)

```
php artisan make:cast  --container=

```

### make:channel

[](#makechannel)

```
php artisan make:channel  --container=

```

### make:command

[](#makecommand)

```
php artisan make:command
php artisan make:command  --container=

```

### make:component

[](#makecomponent)

```
php artisan make:component  --container=

```

### make:controller

[](#makecontroller)

```
php artisan make:controller  --container=

```

### make:enum

[](#makeenum)

```
php artisan make:enum  --container=

```

### make:event

[](#makeevent)

```
php artisan make:event
php artisan make:event  --container=

```

### make:exception

[](#makeexception)

```
php artisan make:exception
php artisan make:exception  --container=

```

### make:factory

[](#makefactory)

```
php artisan make:factory  --container=

```

### make:job

[](#makejob)

```
php artisan make:job
php artisan make:job  --container=

```

### make:listener

[](#makelistener)

```
php artisan make:listener  --container=

```

### make:mail

[](#makemail)

```
php artisan make:mail
php artisan make:mail  --container=

```

### make:middleware

[](#makemiddleware)

```
php artisan make:middleware
php artisan make:middleware  --container=

```

### make:model

[](#makemodel)

```
php artisan make:model  --container=

```

### make:notification

[](#makenotification)

```
php artisan make:notification
php artisan make:notification  --container=

```

### make:observer

[](#makeobserver)

```
php artisan make:observer  --container=

```

### make:policy

[](#makepolicy)

```
php artisan make:policy  --container=

```

### make:provider

[](#makeprovider)

```
php artisan make:provider
php artisan make:provider  --container=

```

### make:request

[](#makerequest)

```
php artisan make:request  --container= --uiType=api
php artisan make:request  --container= --uiType=web

```

### make:resource

[](#makeresource)

```
php artisan make:resource  --container=

```

### make:rule

[](#makerule)

```
php artisan make:rule  --container=

```

### make:scope

[](#makescope)

```
php artisan make:scope  --container=

```

### make:seeder

[](#makeseeder)

```
php artisan make:seeder
php artisan make:seeder  --container=

```

### make:test

[](#maketest)

```
php artisan make:test  --container= --uiType=api
php artisan make:test  --container= --uiType=cli
php artisan make:test  --container= --uiType=web

```

2. Model
--------

[](#2-model)

### make:show

[](#makeshow)

```
php artisan make:show --container=

```

Additional console commands
===========================

[](#additional-console-commands)

1. Make
-------

[](#1-make-1)

This is a list of console commands for the Porto who does not exists in Laravel.

Without container name some commands will be created class in the Ship.

Other commands require the container name

### make:action

[](#makeaction)

```
php artisan make:action  --container=

```

### make:config

[](#makeconfig)

```
php artisan make:config
php artisan make:config  --container=

```

### make:contract

[](#makecontract)

```
php artisan make:contract  --container=

```

### make:helper

[](#makehelper)

```
php artisan make:helper

```

### make:repository

[](#makerepository)

```
php artisan make:repository

```

### make:task

[](#maketask)

```
php artisan make:task  --container=

```

### make:trait

[](#maketrait)

```
php artisan make:trait  --container=
php artisan make:trait  --container= --test

```

### make:translation

[](#maketranslation)

```
php artisan make:translation  --lang=

```

### make:value

[](#makevalue)

```
php artisan make:value  --container=

```

License
-------

[](#license)

Released under the MIT License, see [LICENSE](LICENSE).

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/76a870b5abdcb375c9dd5f59e0bf4e869b505abfe348831c36bf6fc2586c6f44?d=identicon)[iadewunmi](/maintainers/iadewunmi)

---

Top Contributors

[![ife-adewunmi](https://avatars.githubusercontent.com/u/79491346?v=4)](https://github.com/ife-adewunmi "ife-adewunmi (7 commits)")

### Embed Badge

![Health badge](/badges/iadewunmi-laravel-porto-sap/health.svg)

```
[![Health](https://phpackages.com/badges/iadewunmi-laravel-porto-sap/health.svg)](https://phpackages.com/packages/iadewunmi-laravel-porto-sap)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M299](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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