How attach after save another model

Hi friends, help me please, how I can do for save InventorEntry model and get the id for attach a product on a manytomany relationship, thanks!

public function store(Request $request)
    return redirect('inventory_entry.index')->with('message', 'store');

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us