public function purchase() { $data['purchases'] = DB::table('products')->join('purchase', 'purchase.product_id', '=', 'products.id')->get(); $data['products'] = Products::lists('name', 'id'); return \View::make('purchase', $data); }
public function addSale() { $data['products'] = Products::lists('name', 'id'); return \View::make('addSale', $data); }