Imrpoving Item, Product and Users

This commit is contained in:
2018-09-11 20:48:09 -03:00
parent 4b3c2089f5
commit 0f15e60c95
17 changed files with 155 additions and 59 deletions

View File

@@ -23,7 +23,11 @@ class HomeController extends Controller
*/
public function index()
{
$items = \App\Item::where('userID');
$items = \DB::table('items')
->join('item_user', 'item_user.item_id', '=', 'items.id')
->where('item_user.user_id', \Auth::id())
->select('items.*')
->get();
return view('home', compact('items'));
}
}