I have a weird situation here that I never seen before while using Laravel. I have the same code base on different set up, 1 in IPv4 VM, 1 in IPv6 VM.
This is the data in the database.
This is how I normally query it.
// $ap = '102030405067';
$gw = Gateway::where('cpe_mac','=',$ap)->first();
dd($gw);
In my IPv4 Set up, I got :
{#541 ▼
+"id": 1
+"account_id": "50"
+"cpe_mac": "102030405067"
+"gw_id": "1956692524588882"
+"gw_secret": "zUIyaQfCntob2thL6uR4uQfBvmlCei-5q_oVSJnyeSc"
+"fb_wifi_enable": "1"
+"created_at": "2017-10-10 14:41:17"
+"updated_at": "2017-10-10 14:41:17"
}
In my IPv6 Set up, I got :
null
Try #2
dd(Gateway::all());
.
Result
In IPv4, I got all the records returned.
In IPv6, I got this empty collection
Collection {#542 \u25bc
#items: []
}
The most confusing part is, other tables seems to work fine, this gateways
seems to be the only one that causing the problem.
I triple checked my Gateway model name, and table name. They spelled correclty.
Have you guys seen something like this before ?
How would one go about and debug this issue further ?
What else should I try ?