📜  如何在 laravel 中更新下拉列表值 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:46.534000             🧑  作者: Mango

代码示例2
public function edit($product_id)
    {
        $all_categories = DB::table('tbl_category')->get();
        $all_manufactures = DB::table('tbl_manufacture')->get();

        $product =  DB::table('tbl_product')
            ->where('product_id',$product_id)
            ->get()->first();

        return View('admin.edit-product')->with([
            'product'=>$product,
            'all_categories'=>$all_categories,
            'all_manufactures'=>$all_manufactures,
            ]);
    }