/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return view('omnomcom.categories.index', ['categories' => ProductCategory::all()]); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { return view('omnomcom.products.edit', ['product' => Product::findOrFail($id), 'accounts' => Account::orderBy('account_number', 'asc')->get(), 'categories' => ProductCategory::all()]); }