承接 wouterj/eloquent-bundle 相关项目开发

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

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

wouterj/eloquent-bundle

Composer 安装命令:

composer require wouterj/eloquent-bundle

包简介

Implementing the Eloquent ORM into Symfony

README 文档

README

The WouterJEloquentBundle claims to integrate the Eloquent ORM into the Symfony framework.

Maintained Releases

Only the latest release of this bundle is maintained. Backwards compatible support for new versions of PHP, Symfony and Laravel are considered bug fixes. Dropping support for old versions is considered a feature.

New releases will be made as much as once a week following semantic versioning. The default branch (2.x) will be released as minor or patch version, depending on the changes with the last release (features or only bug fixes).

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and run the following command to download the latest stable version of this bundle:

$ composer require wouterj/eloquent-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

When you want to use useful make commands (e.g. make:model), also make sure you have the Symfony MakerBundle installed.

Step 2: Enable the Bundle

If you're using Symfony Flex, the previous step already got you up and running and you can skip this step!

Otherwise, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

<?php
// config/bundles.php

return [
    // ...
    WouterJ\EloquentBundle\WouterJEloquentBundle::class => ['all' => true],
];

Step 3: Configure the Database

To use the Eloquent ORM, configure a connection by setting the correct environment variables in .env.local:

# .env.local
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=symfony
DB_USERNAME=root
DB_PASSWORD=s3cr3t

If you're not using Symfony Flex, create the configuration file yourself:

# config/packages/eloquent.yaml
wouterj_eloquent:
    driver:   mysql
    host:     localhost
    database: db_name
    username: root
    password: pass
    prefix:   ~

For more information, refer to the documentation below.

Table of Content

  1. Installation
    1. Step 1: Download the Bundle
    2. Step 2: Enable the Bundle
    3. Step 3: Configure the Database
  2. Usage
    1. Query Builder
    2. Eloquent ORM
    3. Using Services instead of Facades
  3. Migrations and Seeding
    1. Running seeders
    2. Setting up
    3. Generating migrations
    4. Running migrations
    5. Rolling migrations
    6. Refreshing the database
  4. Using Models in Forms
    1. Binding the Object to the Form
    2. Form Type Guessing
    3. Form Validation
  5. Using the Eloquent User Provider
    1. Creating the User Model
    2. Configuring the User Provider
  6. Events and Observers
    1. Register Listeners
    2. Observers
      1. Observers as Services
  7. Configuration
    1. Full configuration
    2. Connections
      1. Drivers
      2. Default connection
    3. Eloquent
    4. Aliases
  8. License
  9. Contributing
  10. Backwards Compatibility

License

This project is licensed under the MIT license. For more information, see the license file included in this bundle.

Contributing

I love contributors. You can submit fixes, report bugs, share your opinion, advocate this bundle or just say "hello". I welcome anything that makes this project better.

wouterj/eloquent-bundle 适用场景与选型建议

wouterj/eloquent-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 168.02k 次下载、GitHub Stars 达 166, 最近一次更新时间为 2014 年 02 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 wouterj/eloquent-bundle 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 168.02k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 169
  • 点击次数: 5
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 166
  • Watchers: 5
  • Forks: 40
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-02-27