Support the ongoing development of Laravel.io →
Configuration Database
Last updated 2 years ago.
0

Have you turned on debugging in your app config file?

Last updated 2 years ago.
0

Yes sir:

ErrorException
call_user_func_array() expects parameter 1 to be a valid callback, class 'Illuminate\Database\MySqlConnection' does       not have a method 'query'
Last updated 2 years ago.
0

Well, after a bit more digging around, it seems that DB::query does not really work so well in Laravel 4 (perhaps deprecated?)

But by using: DB::select("SELECT * from..... )

That does seem to work. So it seems that this is not so much a connection issue, but rather a using the proper command issue.

Hopefully this helps anyone trying to learn Laravel 4 using, apparently, a Laravel 3 tutorial...

Last updated 2 years ago.
0

Thanks it did. This also helped: http://laravel.com/docs/database

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.