I am learning laravel for a job in college with my classmates, they have more experience in the language but none of them could explain how to do this
I have a data in a view that I want to send to another to fill a space in a form
The code of the first view is this:
<tbody>
@foreach($areas as $area)
<tr>
<td>{{ $area -> COD_AREA}} </td>
<td>{{ $area -> NOMBRE_AREA}} </td>
<td>{{ $area -> DESC_AREA}} </td>
<td>
<div class="text-center">
<h4>
<a href='{{ route('subarea.create',$area->NOMBRE_AREA) }}' data-toggle="tooltip" data-placement="right" title="Registar Subarea">
<i class="fas fa-plus-square" aria-hidden="true"></i>
</a>
</h4>
</div>
</td>
</tr>
@endforeach
</tbody>
And the code of the second view is this:
<div>
{!! Form::open(['route'=>'subarea.store','method'=>'POST']) !!}
.....
<div class="form-group row">
{!! Form::label('NOMBRE_AREA','Nombre del area al que pertenece',['class'=>'col-sm-2 col-form-label']) !!}
<div class="col-sm-10">
{!! Form::text('NOMBRE_AREA', $area, ['class'=>'form-control']) !!}
</div>
</div>
</div>