“Cara memperbarui nilai dropdown di Laravel” Kode Jawaban

Tunjukkan nilai yang dipilih di dropdown laravel

<select class="js-states browser-default select2" name="shopping_id" required id="shopping_id">
        <option value="option_select" disabled selected>Shoppings</option>
        @foreach($shoppings as $shopping)
            <option value="{{ $shopping->id }}" {{$company->shopping_id == $shopping->id  ? 'selected' : ''}}>{{ $shopping->fantasyname}}</option>
        @endforeach
    </select>
Mohamad

Cara memperbarui nilai dropdown di Laravel

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,
            ]);
    }
Spotless Snake

Jawaban yang mirip dengan “Cara memperbarui nilai dropdown di Laravel”

Pertanyaan yang mirip dengan “Cara memperbarui nilai dropdown di Laravel”

Lebih banyak jawaban terkait untuk “Cara memperbarui nilai dropdown di Laravel” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya