Input that depends on the LARAVEL select

1

Good I'm trying to get data from a select, for example image we have a select that has the classic of products, such as name, description, price, etc ....

The case is that I get that select with the pluck but how could for example when selecting something that I send to an input for example the price or the description?

This is what I have for now:

My Controller:

public function lista(){

  $productos = Productos::pluck('Codigo','Descripcion','PVP','id')->prepend('selecciona'); 
  return view ('Productos.NuevoProducto2',compact('productos'));

}

My view:

@extends('admin.plantilla')

@section('content')

@include('admin.partial.error')

{!! Form::select('producto',$productos,null,['id'=>'producto', 'data-live-search'=>'true']) !!}

@endsection

@section('javascript')

@stop

And my route:

Route::get('/probando','ProductosController@lista')->name('listaProductos');

I have not included the input yet, since I do not know how I can extract this data and paste it.

any help?

Thanks

    
asked by Jose Maria Montoya Rincon 12.09.2018 в 22:33
source

0 answers