Laravel sqlsrv works in tinker mode but not in browser
问题 I have a Laravel 5 project (on a CentOS 7 machine) that connects to an external MSSQL database. I followed the setup outlined here using FreeTDS. When I hit the page using a browser I get the error: SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9) . But when I use php artisan tinker and do something like App\MyModel::get(); , it returns an Illuminate\Database\Eloquent\Collection instance with the records/models just fine. Anyone knows what's