简体   繁体   English

如何从 Lumen 连接到 Firebird 数据库?

[英]How to connect to a Firebird database from Lumen?

I'm new to Lumen and I'm trying to read data from Firebird database.我是 Lumen 的新手,我正在尝试从 Firebird 数据库读取数据。

I installed the package via Composer: laravel-firebird我通过 Composer 安装了这个包: laravel-firebird

I created a 'config' folder with a database.php file as in Laravel and defined my connection to Firebird and register in app.php我在 Laravel 中创建了一个带有 database.php 文件的“config”文件夹,并定义了与 Firebird 的连接并在 app.php 中注册

$app->configure('database'); $app->configure('数据库');

I created my Model and a Controller to read the data.我创建了我的模型和一个控制器来读取数据。 However, the error is returning:但是,错误正在返回:

Unsupported driver [firebird]不支持的驱动程序 [firebird]

What should I do?我该怎么办? Do I need to register the Provider?我需要注册提供商吗? And how do I do that?我该怎么做?

我能够通过在app.php文件的服务提供者部分添加以下行来解决问题:

$ app-> register (\ Firebird \ FirebirdServiceProvider :: class);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM