title: How to display data by using foreach in laravel view
body: <p>I am displaying data in laravel view by using foreach loop.But the loop display's some thing <a href="https://i.stack.imgur.com/eAUe5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eAUe5.png" alt="like this"></a></p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>class StudViewController extends Controller {
  
  public function index(){
      $studentList = DB::select('select * from student');
      // var_dump($studentList);
      return view('stud_view',['students'=&gt;$studentList]);
  }
  </code></pre>
  
  <p>}
  ?></p>
  
  <p><strong>View</strong></p>
  
  <pre><code>&lt;!DOCTPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;View Student Records&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;table border = "1"&gt;
  &lt;tr&gt;
  &lt;td&gt;Id&lt;/td&gt;
  &lt;td&gt;First Name&lt;/td&gt;
  &lt;td&gt;Last Name&lt;/td&gt;
  &lt;td&gt;City Name&lt;/td&gt;
  &lt;td&gt;Email&lt;/td&gt;
  &lt;/tr&gt;
  @foreach ($students as $student)
  &lt;tr&gt;
  &lt;td&gt;{{ $student-&gt;id }}&lt;/td&gt;
  &lt;td&gt;{{ $student-&gt;first_name }}&lt;/td&gt;
  &lt;td&gt;{{ $student-&gt;last_name }}&lt;/td&gt;
  &lt;td&gt;{{ $student-&gt;city_name }}&lt;/td&gt;
  &lt;td&gt;{{ $student-&gt;email }}&lt;/td&gt;
  &lt;/tr&gt;
  @endforeach
  &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>can any one try to help me.</p>
  
  <p>Thank you</p>