I have created a view page where I am getting an Eloquent variable from my controller. That variable points to the elements in a table. This is my current code.
<table border="0px">
<tr>
@foreach ($teacher as $value)
<?php
$tid = $value->teacherID;
?>
<tr>
<td> <a href="info/{{ $tid }}"> {{ $value['teacher_name'] }} </a></td>
<td>{{ $value['course_name'] }}</td>
</tr>
<hr>
@endforeach
</tr>
</table>
I am getting an unexpected output with this code. I am getting number of blank spaces in the beginning and then my table(mysql) elements. Please help me resolve the issue guys. Thanks, Regards.