I am new to laravel 5.4. I am not able to find a solution to this problem anywhere.
what I am returning $items filtered it gives me an error.
Controller
public function data()
{
$items = registerdetails::all();
return view('traineeattendance.details', compact('items'));
}
View
<div class="form-group">
<label>Trainee ID</label>
input type="text" name="trainee_id" class="form-control" value=" <td>{{ $item->trainee_id }}</td>">
</div>`
How can I fix this error?
$itemswould be an array. You need to check and use accordingly.@foreach ($items as $item) <div>{{ $item->FIELD_NAME }}</div> @endforeach