I use laravel 5.6
My eloquent laravel like this :
public function list($status)
{
return DB::table('orders')->whereIn('id', $status)->paginate(5);
}
Status parameter is dynamic
If $status = [1,2,3], it works
But if $status = [2], it does not works, the result null
So, if the number of arrays = 1, whereIn does not work
How can I solve this problem?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2pTNzJZ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire