Last active
December 18, 2018 09:39
-
-
Save cygeorgel/d3d61cabfa75407fe87ae5ae0a89ab7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$customers_ids = \DB::table('tasks') | |
->selectRaw('DISTINCT customer_id') | |
->where('status_id', '>', '2') | |
->where('status_id', '<', '6') | |
->pluck('customer_id') | |
->toArray(); | |
$customers = Customer::whereIn('id', $customers_ids)->get(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment