Thursday, April 13, 2017

Fetch only years and calculated number of sales in Laravel

I have a contracts table with customer and device ID, what I want to achieve is:

  • First: fetch only all years from (from column)
  • Second: calculate the total of device sold in that year show it on JavaScript Graph !

enter image description here

enter image description here

where the contract_type_id 2 = sold.

Thanks :)



via Ahmed Abdulrahman

Advertisement