KKSzymanowski / laravel-6-odbc

9 stars 2 forks source link

More Information Please #1

Closed VijeshDatt closed 4 years ago

VijeshDatt commented 4 years ago

Hi there,

I have recently started using Laravel and found your ODBC plugin for Laravel 6+. Would you mind providing some documentation on how to use this?

Thank you in advance.

KKSzymanowski commented 4 years ago

I added the README.md file with installation and usage instructions. You can check it out here.

Let me know if that helps.

darrenhusa commented 4 years ago

I am having trouble getting this to work. Do you need to edit config/app.php? I tried to add an application service provider for this driver.

I tried adding the following:

Odbc\OdbcServiceProvider::class,

I used Odbc based on the namespace of the OdbcServiceProvider class.

KKSzymanowski commented 4 years ago

What version of Laravel are you using? If you're using 5.5 or higher then the package should be automatically discovered. Run composer dump-autoload and check if you see this package in the list at the end of the command output.

What is your issue? Do you have a specific error?

darrenhusa commented 4 years ago

I am using laravel 7.0. I ran the composer dump-auto-load and I do see the line:

Discovered Package: kkszymanowski/laravel-6-odbc

I get an PDOException with message 'invalid data source name' when I try to use the query builder from tinker. I am using a .env and config/database.php setup similar to other odbc packages I have used.

Any suggestions?

KKSzymanowski commented 4 years ago

I cannot give any insight without seeing the config. Can you run config('database') in the Tinker and paste in the output here? Remove the passwords and any other sensitive data of course.

darrenhusa commented 4 years ago

I do not need to pursue debugging this any further. I was able to get an alternate laravel odbc-driver to work with version 7.

Thanks for you time.