When I use where on collection in Laravel 5.2 on local server I have to use integer value to filter values, but when I deploy on remote server I have to use string value on where function. Like this:
$indicators = Indicator::get();
$main_indicators = $indicators->where('main',1)->all();
//$main_indicators works on local empty on remote
$indicators = Indicator::get();
$main_indicators = $indicators->where('main','1')->all();
//$main_indicators works on remote empty on local
This happens only when filtering a collection, created by Eloquent query. When I use where in eloquent query its working like this on every server:
Indicator::where('main',true)->get();
main is boolean (tinyInt(1) on MariaDB).
Migration:
$table->boolean('main')->default(false);
Local server: MacOSX, Xammp, PHP 7
Remote server: PHP 7, Apache
I want same code on every server, I want to change remote server, but I dont know what to set. Its really annoying develop two versions...
Database is the same on both servers.
Web server is Apache. Thanks