i have table in mysql like this
-----------------------------
|id|warehouse_id|item_id|qty|
---|------------|-------|---|
|1 | 1 | 1 |10 |
|2 | 1 | 2 |23 |
|3 | 2 | 1 |45 |
|4 | 2 | 2 |66 |
|5 | 1 | 3 |44 |
How using select statement to show table what i want like this
------------------------------------------
|id|item_id|qty warehouse 1|qty warehouse 2
---|-------|---------------|-------------
|1 | 1 | 10 |45 |
|2 | 2 | 23 |66 |
|3 | 3 | 44 |0 |
i was trying using eloquent laravel like this
ItemStockModel::get()
thank you