定制 aula72/malaika 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

aula72/malaika

Composer 安装命令:

composer create-project aula72/malaika

包简介

Create any CRUD in seconds, this lightweight framework focuses on fast delievery of robust and reliable APIs. In software development security is always a base required this framework provides basic security with a room for improvement.

README 文档

README

Overview

This is a lightweight PHP RESTful framework designed to simplify API development. It follows MVC principles, provides easy routing, and supports middleware for enhanced security and flexibility.

Features

  • Simple and clean routing
  • JSON response handling
  • Error handling and logging
  • Database integration using PDO
  • Authentication support (session-based)
  • CORS support

Supported Database systems

  • MySQL
  • Postgres
  • MongoDB
  • Oracle

Installation

Manual Installation

  1. Clone the repository:
    git clone https://github.com/Aula72/wu_php_api_simple_framework.git
    or composer create-project aula72/malaika
  2. Navigate to the project directory:
    cd /path/to/files/clone
  3. Install dependencies:
    composer install

Usage

Configuration

Rename .env.example to .env for database and environment settings. Edit the .env file for configurations includingDB_TYPE to choose a database type you're are intending to use forexample DB_TYPE=postgres for Postgres, the default database system is MySQL; set in .env the database DBNAME and the user password DBPASSW and other additionals database connection settings.

Create tables in your database.

Running the Application

Start a development server:

php -S localhost:8000 

Create your quick CRUD

Visit http://localhost:8000/auto-crud.php

A file name v1.php will be created containing all the necessary CRUD operations for your table.

Edit the index.php add include_once "v1.php" just be the line that has method_caller().

Now you can do CRUD on any table in your database by using the following endpoints

  • GET /<table-name>
  • GET /<table-name>?<column-name>=67
  • GET /<table-name>?<column-name1>=67&&<column-name2>=90
  • POST /<table-name>
  • PUT /<table-name>?<column-name>=67
  • DELETE /<table-name>?<column-name>=67

Forexample if we have a database that has tables/models such as products, categories and product_categories then our endpoints will be as follows

  • GET /products
  • GET /products?id=3
  • POST /products
  • PUT /products?id=2
  • DELETE /products?id=5
  • so forth

If the table products has columns like id, name, category_id, unit_price and quantity then the post request will be in the following format

{"name":"Ice Cream", "category_id":3, "unit_price":5.90, "quantity": 89}

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature-name)
  3. Commit your changes (git commit -m 'Add feature')
  4. Push to the branch (git push origin feature-name)
  5. Open a Pull Request

License

This project is licensed under the MIT License.

Contact

For support, open an issue or contact moncytod@gmail.com.

aula72/malaika 适用场景与选型建议

aula72/malaika 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 02 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 aula72/malaika 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 aula72/malaika 我们能提供哪些服务?
定制开发 / 二次开发

基于 aula72/malaika 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-25