I have this controller who grab the two text fiel values that the user enter before clicking save. Everything going good till i check the values.. nothing happen it seems that the input request doesn't work
Where i'm doing wrong ? i don't get the values entered for "resultat_domicile" and "resultat_visiteur" . thanks a lot in advance if someone could help
here the controller :
public function addResultat(Request $request , $id){
$rencontre = Rencontre::findOrFail($id);
$rencontre->resultat_domicile = $request->input('resultat_domicile');
$rencontre->resultat_visiteur = $request->input('resultat_visiteur');
dd($rencontre);
}
here my view :
{!! Form::open(array('route' => array('add.resultat', $rencontre->id)))!!}
@foreach($rencontres as $rencontre)
<div class="box-body">
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4 text-center">
<p class="h4">{{$rencontre->compet->lb_compet}}</p>
<p class="h4 text-light-blue">{{\Carbon\Carbon::parse($rencontre->dt_rencontre)->format('d/m/Y')}}</p>
<br>
</div>
<div class="col-md-4"></div>
</div>
<div class="row">
<div class="col-md-5">
<h2 class="pull-right"><div class="fa fa-shield pull-right"></div>{{$rencontre->equipe_domicile->lb_equipe}}</h2>
</div>
<div class="col-md-2">
<div class="row">
<div class="col-xs-5">
{!! Form::text('resultat_domicile', null , ['class' => 'form-control', 'placeholder' => 'Ex: 20 points']) !!}
</div>
<div class="col-xs-2 text-center">
<span class="h2">-</span>
</div>
<div class="col-xs-5">
{!! Form::text('resultat_visiteur', null , ['class' => 'form-control', 'placeholder' => 'Ex: 20 points']) !!}
</div>
</div>
</div>
<div class="col-md-5">
<h2 class="pull-left"><div class="fa fa-shield pull-left"></div>{{$rencontre->equipe_visiteur->lb_equipe}}</h2>
</div>
</div>
@endforeach
<div class="box-footer">
<div class="col-xs-12 text-center">
{!! Form::submit('Enregistrer', ['class' => 'btn btn-info btn-lg center-block']) !!}
{!! Form::close() !!}
</div>
</div>
dd($request->resultat_domicile);and see what happens. Let me know if that gave the result