Laravel 5.1, PHP 7.0: WhereNotIn not working
we have this 2 eloquent script which retrieves a user video based on the filter. I know this is working before because I haven't received any complains from the testers and my superiors have verified it is working. $previous_winners = Stage::whereNotNull('win_date') ->where('win_date','>',Carbon::now()->subDays(8)->format('Y-m-d H:i:s')) ->lists('userId') ->toArray(); output for the 1st script is like: array:4 [ 0 => 84 1 => 361 2 => 304 3 => 326 ] but the output of the script below is null $stage = Stage::whereIn('stageId',$id) ->whereNull('win_date') ->whereNotIn('userId',$previous_winners) ->where('stageId','!=',Config::get('constants.intro')) ->where('stageId','!=',88) ->first(); When the controller is called I always get a null value for the 2nd script even though when I checked the data it should retrieve one as I forced it to return results. The issue that I found out is that when removing this line ->whereNotIn('userId',$previous_winners) i get the correct results but when I put it back again i only get null values. I tried moving the whereNotIn to different positions from the first and before the end but as long as it is present I only get null values. Any idea or workaround on this one, please? Thanks.
Pagination Number of Pages
Yii - PHP - How parse subdirectory to a module (and their other params)
Laravel Mail::send() sending to multiple to or bcc addresses
Validating a form using data from data base
Android registration form using php and mysql
Can't clear cache Symfony2
How to duplicate variables into template with phpWord and using cloneBlock
PHP Function return 0 vs false
NWMLS IDX PHP script?
Linux : Setting which php bin to use in CLI
Why does my script still try to create my directory?
require_once is not working in php 5.3.0 [closed]
Class 'ZipArchive' not found error while using PHPExcel
1060 - Duplicate column name 'XX'
PHP UTF8 decode not working for out returned from python
Changing time -1 hour