PHPackages                             dipeshkhatiwada/odbc-connector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. dipeshkhatiwada/odbc-connector

ActiveLibrary[Database &amp; ORM](/categories/database)

dipeshkhatiwada/odbc-connector
==============================

ODBC Driver for Laravel 8.\* to connect with external database

241PHP

Since Feb 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/dipeshkhatiwada/odbc-connector)[ Packagist](https://packagist.org/packages/dipeshkhatiwada/odbc-connector)[ RSS](/packages/dipeshkhatiwada-odbc-connector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ODBC Connector for Laravel
==========================

[](#odbc-connector-for-laravel)

A simple ODBC driver for Laravel 8.\*. Requires PHP version 8+.

### Prerequisites

[](#prerequisites)

Enable the `pdo_odbc` [PHP extension](https://www.php.net/manual/en/ref.pdo-odbc.php).

For other database engines (for instance [MS SQL Server](https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server)), you'll need to install the appropriate PHP extension(s).

### Installation

[](#installation)

```
composer require dipeshkhatiwada/odbc-connector

```

Laravel will automatically discover the service provider.

### Configuration

[](#configuration)

In your `database.php` config, configure your connection using the `odbc` driver:

```
'odbc-connection' => [
    'driver'   => 'odbc',
    'dsn'      => env('ODBC_DSN'),
    'host'     => env('ODBC_HOST'),
    'database' => env('ODBC_DB'),
    'username' => env('ODBC_USERNAME'),
    'password' => env('ODBC_PASSWORD'),
],
```

### Usage

[](#usage)

Use the connection like any other, via the query builder or with Eloquent.

For Eloquent, you'll need to specify the model's connection:

```
class Users extends Eloquent {
    /** @var string */
    protected $connection = 'odbc';
}

```

### Connection String

[](#connection-string)

You may need to use some trial and error to figure out what your connection string should look like. Consult your vendor's database documentation.

It could be a connection path:

```
'dsn' => 'odbc:\\\\path\to\my\database',
```

Or a connection name:

```
'dsn' => 'odbc:\\\\my-connection-name',
```

Or something as simple as:

```
'dsn' => 'odbc:dbname',
```

For SQL server, you'll need to specify the DSN, the user, and the password. For example:

```
'dsn' => 'sqlsrv:Driver=ODBC Driver 18 for SQL Server;Server=tcp:localhost,1433;TrustServerCertificate=1;Encrypt=1;'
'username' => 'sa',
'password' => 'my-super-secret-password',
```

### Contributions &amp; License

[](#contributions--license)

Contributions are hearty welcome.

MIT Licensed.You can wish to modify.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/677cb8050f75ca48cced8161fb80791677fa765eeb81720746934b171a098cac?d=identicon)[dipeshkhatiwada](/maintainers/dipeshkhatiwada)

---

Top Contributors

[![dipeshkhatiwada](https://avatars.githubusercontent.com/u/36506485?v=4)](https://github.com/dipeshkhatiwada "dipeshkhatiwada (2 commits)")

### Embed Badge

![Health badge](/badges/dipeshkhatiwada-odbc-connector/health.svg)

```
[![Health](https://phpackages.com/badges/dipeshkhatiwada-odbc-connector/health.svg)](https://phpackages.com/packages/dipeshkhatiwada-odbc-connector)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
