Thursday, March 9, 2017

Error when using "whereNotIn" method [laravel]

whenever I run this query, to return data not in another table I get this error

BadMethodCallException in Macroable.php line 74:
Method whereNotIn does not exist

Query

  $shipment_data_unassigned = Shipment::all()->where('status','=', $rulesetname)
   ->Where('shipment_cycle', '!=', 'closed')
    ->whereNotIn('ccctadm.Shipment.id',$assigned);

What am I doing wrong ?



via Ahmadz Issa

Advertisement