I am new to Laravel 5.4.
I am facing a big problem to make decision whether I should focus on mySQL or Elequent or query builder to make complex query.
For example: I need a electric bill report based on different charge range.
0-99=>$120
100-199=>$200
200-299=>$220
300-399=>$250
How can make a elequent query or query builder to make a report with other data such as Customer name, address, phone, sum of total, with details list of which range is being charged to him etc?
Should I use raw SQL query for this?
As I am using AngularJs, I have to return all this in a single query. If you want to help me using a controller, you can show me.
What can I do?
I used .Net where I can make this easily by LINQ query, but I am stuck here!
I think laravel query builder is not powerful like LINQ. Leave .Net if you are not familiar with it.
Anyways, I need help to get out of the problem. How can I write that complex query?
Desired result:
Suppose I have Customers
table, Billranges
table and Bill
table
I need:
Customername-Address-Metter-Charge-Bill
John-Dhaka-250-$220 -55000(250x220)
Can I do this in Laravel 5.4 Query builder?