laravel/database
Composer 安装命令:
composer create-project laravel/database
包简介
Get Laravel database for your non laravel projects. Built on top of illuminate/database to provide migration, seeding and artisan support
README 文档
README
Provides full laravel database functionality for your non laravel projects adds Migration, Seeding and Artisan support to Illuminate Database.
It enables artisan command line tool with:
Available commands:
db Start a new database CLI session
dump-autoload Regenerate framework autoload files
env Display the current framework environment
help Display help for a command
inspire Display an inspiring quote
list List commands
migrate Run the database migrations
serve Serve the application on the PHP development server
tinker Interact with your application
db
db:seed Seed the database with records
db:wipe Drop all tables, views, and types
make
make:command Create a new Artisan command
make:controller Create a new controller class
make:factory Create a new model factory
make:migration Create a new migration file
make:model Create a new Eloquent model class
make:seeder Create a new seeder class
migrate
migrate:fresh Drop all tables and re-run all migrations
migrate:install Create the migration repository
migrate:refresh Reset and re-run all migrations
migrate:reset Rollback all database migrations
migrate:rollback Rollback the last database migration
migrate:status Show the status of each migration
vendor
vendor:publish Publish any publishable assets from vendor packages
Laravel is a web application framework with expressive, elegant syntax. We extracted the database functionality from it and made it available for other frameworks.
The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style ORM, and schema builder. It currently supports MySQL, Postgres, MSSQL Server, and SQLite. We combined it with Illuminate FileSystem and Illuminate Console to make Artisan work with database related commands.
Installation
Install Composer
Laravel Database utilizes Composer to manage its dependencies.
First, download a copy of the composer.phar. Once you have the PHAR archive,
you can either keep it in your local project directory or move to usr/local/bin
to use it globally on your system. On Windows, you can use the Composer
Windows installer.
Install Laravel Database
Install Laravel Database by issuing the Composer create-project command in your terminal:
composer create-project laravel/database --prefer-dist
Usage Instructions
From your public index.php include the autoload.php in bootstrap folder this internally uses composer autoloader.
This enables lazy loading of all db related classes. It doest not boot the database engine until you call one
of the DB related class.
Adding More Components
For instructions on how to add more laravel components or compatible third party service providers etc.,
read the comments in app/config/app.php file
Practical Usage Example
- Restler Application Eloquent Template enables restler framework application's to utilize the power and elegance of eloquent
Official Documentation
Documentation for the entire framework can be found on the Laravel website. Refer to all database related sections from there.
Credits
All the credits for the Laravel Database goes to the Laravel Framework developers. We are only putting the pieces together here
Contributing
Issues and pull requests relating to this integration should be filed on the laravel/database repository.
License
The Laravel Database is open-sourced software licensed under the MIT license
laravel/database 适用场景与选型建议
laravel/database 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 35.99k 次下载、GitHub Stars 达 90, 最近一次更新时间为 2014 年 05 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「database」 「orm」 「sql」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 laravel/database 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 laravel/database 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 laravel/database 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Kinikit - PHP Application development framework MVC component
Store your language lines in the database, yaml or other sources
PHP Database ORM for Symfony1. Do NOT use for new projects: please move to a newest Symfony release and Doctrine2
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Query filtering in your frontend
统计信息
- 总下载量: 35.99k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 100
- 点击次数: 31
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-05-20