Download the PHP package swoft-laravel/database without Composer

On this page you can find all versions of the php package swoft-laravel/database. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package database

swoft-laravel-databases

集成 laravel orm 组件至 swoft

php >7.2, swoole > 4.0.3, swoft > v1.9 (暂不支持v2.x)

技术细节

  1. 技术目标:
    • 独立使用 laravel database, 文档和使用方式参考lavarl 社区文档
    • 在不扩大代码量的情况下,尽可能地迁移 laravel database 的功能: QueryBuilder, Model, ORM, 配置项
    • 支持swoole Coroutine\MySQL 异步客户端
    • 支持coroutine mysql连接池
  2. 实现
    • 代码部分主要参照 官方文档 ,在它的基础之上,整合laravel database数据库配置加载方式
    • 参考 database 本身的mysql driver实现,对Coroutine\MySQL的相关调用做了一层代理封装, 使其可以与复用mysql driver部分的代码

      安装

      在composer.json require 中添加如依赖

更新依赖

在根目录下新建文件 config\database.php

如果需要使用 swoole 异步客户端,需要绑定命名空间下的事件监听器 在配置文件 config\properties\app.php 添加如下配置

或者手工管理 初始化连接

连接生命周期结束则自动回收

使用


All versions of database with dependencies

PHP Build Version
Package Version
Requires swoft/framework Version ~1.0
illuminate/database Version ~5.7.2
illuminate/config Version ~5.7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package swoft-laravel/database contains the following files

Loading the files please wait ....