virhi/lazy-rest-api-bundle

在 doctrine orm 上生成 Rest Hal API

安装: 2

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放性问题: 0

类型:symfony-bundle

dev-standealonebehat 2015-01-10 19:21 UTC

This package is not auto-updated.

Last update: 2024-09-28 17:12:32 UTC


README

#LazyRestApiBundle

使用 doctrine 自动生成 API REST,支持 CRUD 操作。

alt text

##安装

编辑你的 composer.json

"require": {
    "virhi/lazy-rest-api-bundle" : "master"
}

然后运行 Composer

php composer.phar update virhi/lazy-rest-api-bundle

AppKernel.php 中启用你的包

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Virhi\LazyRestApiBundle\VirhiLazyRestApiBundle(),
    );
}

编辑你的配置

virhi_lazy_rest_api:
    manager: Manager

你可以选择暴露实体和实体的操作

virhi_lazy_rest_api:
    manager: Manager
    expose_entities:
        your_entity: { entity_name: Namespace\YourEntity, edit_mode: false, delete_mode: true, create_mode: true }

文档