как я могу получить идентификатор и, в свою очередь, значение v-текста, чтобы сохранить его в таблице
Я хочу сохранить id
таблицы malla_curricular
в поле idMalla
и значение полей pAcademicoInicio
cicloLectivoInicio
в поле periodoLectivoMallaOrigen
таблицы estudio_reingreso
введите описание изображения здесь
<Label>Seleccione el periodo de la malla</Label>
<select v-model="idMalla" class="form-control col-md-12">
<option v-for="malla in arrayPeriodo" :key="malla.id" :value="malla.id" v-text="malla.pAcademicoInicio + ' - ' + malla.cicloLectivoInicio">
</option>
Здесь используется метод vue, где я не знаю, как получить значения для отправки их в другую таблицу
EventSubir(){
let me = this;
axios.post('/estudioreingresomat/registrar',{
'id': this.id,
'idMalla': this.idMalla,
'periodoLectivoMallaOrigen': this.periodoLectivoMallaOrigen,
'periodoLectivoMallRediseñada': this.periodoLectivoMallRediseñada,
}).then(function (response) {
console.log('EXITO!!');
}).catch(function (error) {
console.log('error al ingresar el estudio!!');
console.log(error);
});
},
public function store(Request $request) {
if (!$request->ajax()) return redirect('/');
try{
DB::beginTransaction();
$estudioReingreso = new EstudioReingreso();
$estudioReingreso->idMalla = $request->idMalla;
$estudioReingreso->periodoLectivoMallaOrigen = $request->periodoLectivoMallaOrigen;
$estudioReingreso->periodoLectivoMallRediseñada = $request->periodoLectivoMallRediseñada;
$estudioReingreso->save();
session(['estudioReingreso' => $estudioReingreso->id]);
DB::commit();
} catch (Exception $e){
echo('se tosteo lpm');
DB::rollBack();
}
}