I'm making a second connection of my project in laravel with a view in an MsSql database, I configured my .env and config correctly, however this is an error of memory overflow:
$ php artisan tinker
Psy Shell v0.10.5 (PHP 7.3.24-3+ubuntu18.04.1+deb.sury.org+1 — cli) by Justin Hileman
>>> use App\Condinvest\BoletoPropCondominio as BPC
>>> BPC::first();
Illuminate\Database\QueryException with message 'SQLSTATE[HY001] Unable to allocate sufficient memory (meudominio.com.br:5000) (severity 8) (SQL: select top 1 * from [View_Boleto_Prop_Condominio])'
>>>
already changed in my php.ini:
memory_limit = 128M
but the error continues.
My models briefly look like this:
BaseView.php
<?php
namespace App\Condinvest;
use Illuminate\Database\Eloquent\Model;
class BaseView extends Model
{
protected $connection = 'condinvest';
}
BoletoPropCondominio.php
<?php
namespace App\Condinvest;
class BoletoPropCondominio extends BaseView
{
protected $table = 'View_Boleto_Prop_Condominio';
protected $fillable = [
'Id_Condo_lan',
...
'Id_titular'
];
}
when I do the same query directly through the command terminal:
SELECT TOP 1 * FROM View_Boleto_Prop_Condominio;
returns my data successfully.
Can anyone tell me what may be happening, or how I can debug better to understand where the error is, please.
EDIT
>>> DB::connection('condinvest')->getConfig()['driver']
=> "sqlsrv"