cireramos / raw-query
响应是一个运行原始查询的包。
1.0.1
2023-01-04 04:02 UTC
Requires
- php: ^7.4|^8.0
- cirelramos/cache-query-builder: ^1.0
- cirelramos/error-notification: ^1.0
- cirelramos/logs: ^1.0
- guzzlehttp/guzzle: ^6.3.1|^7.0.1
- illuminate/config: ^7.20|^8.19|^9.0
- illuminate/contracts: ^7.20|^8.19|^9.0
- illuminate/database: ^7.20|^8.19|^9.0
- illuminate/http: ^7.20|^8.19|^9.0
This package is not auto-updated.
Last update: 2024-09-26 10:12:23 UTC
README
关于
原始查询
是一个包,用于作为从PHP纯代码迁移旧代码的第一步,以运行原始PHP查询。
如何创建Composer包的教程
安装
在您的composer.json
中要求安装cirelramos/raw-query
包,并更新您的依赖关系
composer require cirelramos/raw-query
配置
在app.php中设置提供者和别名
'providers' => [ // ... Cirelramos\RawQuery\Providers\ServiceProvider::class, ], 'aliases' => [ 'RawQuery' => Cirelramos\RawQuery\Facades\RawQuery::class ]
默认设置在config/raw-query.php
中设置。发布配置以将文件复制到您的自定义配置
php artisan vendor:publish --provider="Cirelramos\RawQuery\Providers\ServiceProvider"
注意:这对于您更改默认配置是必要的
用法
use Cirelramos\RawQuery\Facades\RawQuery; $product = RawQuery::to('mysql')->getRow("select * from products where id_product=".$idProduct);
许可协议
在MIT许可下发布,请参阅LICENSE。