PHPackages                             kkszymanowski/odbc - 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. kkszymanowski/odbc

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

kkszymanowski/odbc
==================

ODBC Connector for Laravel

6.0.0(6y ago)07MITPHPPHP &gt;=5.4.0

Since Mar 21Pushed 6y agoCompare

[ Source](https://github.com/KKSzymanowski/odbc)[ Packagist](https://packagist.org/packages/kkszymanowski/odbc)[ RSS](/packages/kkszymanowski-odbc/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

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

[](#laravel-odbc-connector)

This is a simple ODBC connector for Laravel 4/5.

### Installation

[](#installation)

Add this to the require section in your composer.json file

```
"tck/odbc": "dev-master"

```

In your config/app.php file add the Service Provider to the service providers array like so...

```
'TCK\Odbc\OdbcServiceProvider',

```

Now in your config/database.php you will need to add your connection details, it'll look something like this...

```
'odbc'   => [
	'driver'   => 'odbc',
	'dsn'      => 'odbc:DB_CONNECTION_STRING', //
	'host'     => 'DB_HOST',
	'database' => 'DB_NAME,
	'username' => 'DB_USERNAME',
	'password' => 'DB_PASSWORD',
],

```

#### Custom Grammar

[](#custom-grammar)

To use SQL Server or other database engines, set the grammar in the config:

```
'odbc'   => [
	...
	'grammar' => [
		'query' => Illuminate\Database\Query\Grammars\SqlServerGrammar::class,
		'schema' => Illuminate\Database\Schema\Grammars\SqlServerGrammar::class,
	],
],

```

### Usage

[](#usage)

Now in your app you can do something like...

```
$data = DB::connection('odbc')->get('tableName')->all();

```

Alternatively, in an Eloquent model you could something like this

```
class Users extends Eloquent {

	protected $connection = 'odbc';
}

```

### DB\_CONNECTION\_STRING - Something to note

[](#db_connection_string---something-to-note)

Dependant upon your database configuration, I personally had some difficulty in working out what the DB\_CONNECTION\_STRING needed to be.

This was some trial and error (with a hell of a lot of Googling!) but you could either use a path, something like...

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

```

Or a connection name

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

```

Hopefully, this will help you!

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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.

###  Release Activity

Cadence

Every ~1652 days

Total

2

Last Release

2416d ago

Major Versions

1.0.x-dev → 6.0.02019-09-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/77635d5459ddb67573adeeeb02327191663699645546e4fed9edc2316e49b395?d=identicon)[KKSzymanowski](/maintainers/KKSzymanowski)

---

Top Contributors

[![bencarter78](https://avatars.githubusercontent.com/u/848019?v=4)](https://github.com/bencarter78 "bencarter78 (12 commits)")[![KKSzymanowski](https://avatars.githubusercontent.com/u/13980973?v=4)](https://github.com/KKSzymanowski "KKSzymanowski (3 commits)")[![mlntn](https://avatars.githubusercontent.com/u/513531?v=4)](https://github.com/mlntn "mlntn (3 commits)")[![totalpeopleltd](https://avatars.githubusercontent.com/u/42638211?v=4)](https://github.com/totalpeopleltd "totalpeopleltd (2 commits)")

### Embed Badge

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

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

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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