So I am getting result like this:
[{"modelone_year":2021,"modeltwo_year":2019}]
How do I need to convert this to this?
[2021,2019]
This is from where I get result:
$years = Invoice::query()
->join('expenses', 'expenses.company_id','=', 'invoices.company_id')
->groupBy('modelone_year')
->groupBy('modeltwo_year')
->get();