承接 ensue/snap 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ensue/snap

最新稳定版本:v1.3.0

Composer 安装命令:

composer require ensue/snap

包简介

Modular architecture build on top of laravel for any laravel project

README 文档

README

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
Laravel 10
php 8.2

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 :)

统计信息

  • 总下载量: 457
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-28