New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ensue/snap

Modular architecture build on top of laravel for any laravel project
1,000
Install
composer require ensue/snap
Latest Version:v1.5.0
PHP:^8.3
Laravel:12 · 13
Older releases:9 · 10 · 11
License:MIT
Last Updated:Jul 10, 2026
Links: GitHub  ·  Packagist
Maintainer: shiva_ensue

Snap System

Snap System is the underlying architecture for Laravel projects, providing essential functionalities and features.

Getting Started

Install package

Install the package using Composer. Run the following command:

composer require ensue/snap

Prerequisites

Package Minimum Version Supported Versions
Laravel 12 12, 13
php 8.3 8.3, 8.4

Exception handler

In your Handler.php located at app/Exceptions/Handler.php, follow these steps:

  1. Remove all existing code within the file.
  2. Extend class with SnapExceptionHandler
  3. Override any methods as needed.

Publish Config and Language Files (Optional)

You have the option to publish the configuration and language files. Use the following command:

php artisan vendor:publish --tag=snap

Generate module

To generate a module, run the following command:

php artisan snap:generate <module-name>

Make sure to replace with the actual name of the module you want to generate.

Extend Model

Extend your model from the SnapAppModel class to inherit additional functionalities.

Module structure

app
├── Modules
│   └── <module-name>
│       ├── Controllers
│       │   └── <module-name>Controller.php
│       ├── Database
│       │   └── Models
│       │       └── <module-name>.php
│       ├── Exceptions
│       ├── Filters
│       │   └── <module-name>Filter.php
│       ├── Interfaces
│       │   └── <module-name>Interface.php
│       ├── Middlewares
│       ├── Providers
│       ├── Repositories
│       │   └── <module-name>Repository.php
│       ├── Requests
│       │   ├── <module-name>CreateRequest.php
│       │   └── <module-name>UpdateRequest.php
│       ├── Routes
│       │   ├── api.php
│       │   └── web.php
│       ├── Views
│       └── ServiceProvider.php
└── System
    └── <module-name>
        └── Database
            ├── Exceptions
            ├── Models
            │   └── <module-name>.php
            └── Traits

Feel free to customize and expand upon the provided instructions as needed for your project. If you encounter any issues or need further assistance, please don't hesitate to contact us.

Contributing

Feel free to contribute :)

Related Packages

internachi/modular

Modularize your Laravel apps

1,270,952 1,214
kascat/easy-module

Easy modular structure for laravel

1,125 2
megaads/clara

Module management in Laravel

951 2
megaads/clara-app-store

Module management in Laravel

226 0
joshlogic/hotswap

A Laravel package that enables modular development by generating self-contained...

103 0

Version History

Version Released PHP Laravel License
v1.5.0 ^8.3 ^12.0|^13.0 MIT
v1.4.0 ^8.2 ^12.0|^13.0 MIT
v1.3.0 ^8.2 ^12.0 MIT
v1.2.2 ^8.2 ^11.30 MIT
v1.2.1 ^8.2 ^11.30 MIT