ensue/snap 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固