{"id":33953059,"url":"https://github.com/appsfortableau/laravel-pdo-odbc","last_synced_at":"2026-04-05T17:37:56.274Z","repository":{"id":39883402,"uuid":"373773803","full_name":"appsfortableau/laravel-pdo-odbc","owner":"appsfortableau","description":"ODBC/Snowflake integration for Laravel Framework to easily create a ODBC connection via Laravel Eloquent.","archived":false,"fork":false,"pushed_at":"2026-03-09T14:22:04.000Z","size":110,"stargazers_count":38,"open_issues_count":14,"forks_count":33,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-03-09T18:57:42.731Z","etag":null,"topics":["database","odbc","snowflake"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appsfortableau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-06-04T08:29:22.000Z","updated_at":"2026-03-09T15:52:16.000Z","dependencies_parsed_at":"2024-01-15T16:17:59.428Z","dependency_job_id":"2de0f045-c1b9-4dfd-97de-556c12c5fdc0","html_url":"https://github.com/appsfortableau/laravel-pdo-odbc","commit_stats":{"total_commits":58,"total_committers":4,"mean_commits":14.5,"dds":0.2068965517241379,"last_synced_commit":"bd4635843893617f8100194ba8c7973308d70fa7"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/appsfortableau/laravel-pdo-odbc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsfortableau%2Flaravel-pdo-odbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsfortableau%2Flaravel-pdo-odbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsfortableau%2Flaravel-pdo-odbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsfortableau%2Flaravel-pdo-odbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appsfortableau","download_url":"https://codeload.github.com/appsfortableau/laravel-pdo-odbc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsfortableau%2Flaravel-pdo-odbc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31444702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T15:22:31.103Z","status":"ssl_error","status_checked_at":"2026-04-05T15:22:00.205Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","odbc","snowflake"],"created_at":"2025-12-12T19:55:03.708Z","updated_at":"2026-04-05T17:37:56.270Z","avatar_url":"https://github.com/appsfortableau.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ODBC/Snowflake Integration for Laravel Framework\n\nEnjoying this project?\n\n[![Buy us a coffee](https://img.shields.io/badge/☕-Buy%20us%20a%20coffee-orange)](https://buy.stripe.com/5kAdTS2Xm45p2IM9AA)\n\nThis repository provides seamless integration of ODBC/Snowflake with Laravel Eloquent.\nIt aims to create a comprehensive ODBC package for Laravel, while also\nfunctioning as a standalone solution.\n\nUnlike the `odbc_*` functions, this package utilizes the `PDO` class,\nresulting in smoother and more convenient integration with Eloquent.\n\nThe primary goal of this package is to offer a standardized approach to connect\nwith an ODBC connection. It supports custom grammars and schemas to accommodate\nvarious ODBC connections, such as Snowflake.\n\n## How to Install\n\nBefore proceeding, ensure that you have PHP version 8.x installed on your system.\n\nTo add the package to your project, run the following command:\n\n```bash\ncomposer require yoramdelangen/laravel-pdo-odbc\n```\n\nBy default, the package will be automatically registered through the\n`package:discover` command.\n\nAlternatively, you can manually register the service provider in the `app.php` file:\n\n```php\n'providers' =\u003e [\n  // ...\n  LaravelPdoOdbc\\ODBCServiceProvider::class,\n];\n```\n\nIf you intend to use the `snowflake_pdo` PHP extension, please follow the\ninstallation guide provided [here](https://github.com/snowflakedb/pdo_snowflake/)\nto set it up.\n\nStarting from version `1.2.0`, the package includes support for `snowflake_pdo`,\nbut it will still function without the Snowflake extension (via ODBC).\n\n## Configuration\n\nThe available driver flavors are:\n\n- ODBC (generic)\n- Snowflake (via ODBC and native through PHP extension)\n- ...\n\n### Snowflake Specific environment variables\n\nYou have the option to customize the Snowflake driver using the following parameters:\n\n```ini\n# When set to `false`, column names are automatically uppercased.\nSNOWFLAKE_COLUMNS_CASE_SENSITIVE=false\n\n# When set to `true`, column names are wrapped in double quotes and their\n# case is determined by the input.\nSNOWFLAKE_COLUMNS_CASE_SENSITIVE=true\n```\n\n### Snowflake Query Grammar options\n\nWhen using the Snowflake flavour, the query grammar compiles `LIKE` clauses as\n`ILIKE` by default (case-insensitive). You can disable this behavior per\nconnection:\n\n```php\n'snowflake_pdo' =\u003e [\n    // ...\n    'options' =\u003e [\n        'use_ilike' =\u003e false,\n    ],\n],\n```\n\n## Usage\n\nConfiguring the package is straightforward:\n\n**Add a Database Configuration to `database.php`**\n\nStarting from version 1.2, we recommend using the native Snowflake extension\ninstead of ODBC, but we'll keep supporting it.\n\n```php\n'snowflake_pdo' =\u003e [\n    'driver' =\u003e 'snowflake_native',\n    'account' =\u003e '{account_name}.eu-west-1',\n    'username' =\u003e '{username}',\n    'password' =\u003e '{password}',\n    'database' =\u003e '{database}',\n    'warehouse' =\u003e '{warehouse}',\n    'schema' =\u003e 'PUBLIC', // change it if necessary.\n    'options' =\u003e [\n        // Required for Snowflake usage\n        \\PDO::ODBC_ATTR_USE_CURSOR_LIBRARY =\u003e \\PDO::ODBC_SQL_USE_DRIVER\n    ]\n],\n```\n\nYou have multiple ways to configure the ODBC connection:\n\n1. Simple configuration using DSN only:\n\n   ```php\n   'odbc-connection-name' =\u003e [\n       'driver' =\u003e 'odbc',\n       'dsn' =\u003e 'OdbcConnectionName', // odbc: will be prefixed\n       'username' =\u003e 'username',\n       'password' =\u003e 'password'\n   ]\n   ```\n\n   or, if you don't have a datasource configured within your ODBC Manager:\n\n   ```php\n   'odbc-connection-name' =\u003e [\n       'driver' =\u003e 'odbc',\n       'dsn' =\u003e 'Driver={Your Snowflake Driver};Server=snowflake.example.com;Port=443;Database={DatabaseName}',\n       'username' =\u003e 'username',\n       'password' =\u003e 'password'\n   ]\n   ```\n\n   \u003e Note: The DSN `Driver` parameter can either be an absolute path to your\n   \u003e driver file or the name registered within the `odbcinst.ini` file/ODBC manager.\n\n2. Dynamic configuration:\n\n   ```php\n   'odbc-connection-name' =\u003e [\n       'driver' =\u003e 'snowflake',\n       // please change this path accordingly your exact location\n       'odbc_driver' =\u003e '/opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib',\n       // 'odbc_driver' =\u003e 'Snowflake path Driver',\n       'server' =\u003e 'host.example.com',\n       'username' =\u003e 'username',\n       'password' =\u003e 'password',\n       'warehouse' =\u003e 'warehouse name',\n       'schema' =\u003e 'PUBLIC', // most ODBC connections use the default value\n   ]\n   ```\n\n   \u003e All fields, except for `driver`, `odbc_driver`, `options`, `username`, and\n   \u003e `password`, will be dynamically added to the DSN connection string.\n   \u003e\n   \u003e Note: The DSN `odbc_driver` parameter can either be an absolute path to\n   \u003e your driver file or the name registered within the `odbcinst.ini`\n   \u003e file/ODBC manager.\n\n## Eloquent ORM\n\nYou can use Laravel, Eloquent ORM, and other Illuminate components as usual.\n\n```php\n# Facade\n$books = DB::connection('odbc-connection-name')\n            -\u003etable('books')\n            -\u003ewhere('Author', 'Abram Andrea')\n            -\u003eget();\n\n# ORM\n$books = Book::where('Author', 'Abram Andrea')-\u003eget();\n```\n\n## Troubleshooting and more info\n\nWe have documented all weird behavious we encountered with the ODBC driver for\nSnowflake. In case of trouble of weird messages, checkout the following links:\n\n- [Snowflake ODBC](docs/snowflake-odbc.md)\n- [Snowflake ODBC Troubleshooting](docs/snowflake-odbc-troubleshooting.md)\n\n## Customization\n\n- [Custom `getLastInsertId()` Function](docs/custom-last-insert-id.md)\n- [Custom Processor/QueryGrammar/SchemaGrammar](docs/custom-grammers.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsfortableau%2Flaravel-pdo-odbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappsfortableau%2Flaravel-pdo-odbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsfortableau%2Flaravel-pdo-odbc/lists"}