Not specifically a Laravel question, but I am using Laravel Query Builder. I have a MySQL database column that contains any one of a long list of statuses. When filtering the list I simply pass the status or statuses as an array to the query...
$statusArray = ['active','inProgress'];
DB::table('mytable')->whereIn('status', $statusArray)->get();
However when not filtering I want all statuses returned so I would wish for something like...
$statusArray = [*];
Is there a simple way to handle this or do I need to dynamically build the whereIn clause for the query?