{{ }}
is for echo
in php
First check output as
<?php print_r($students); ?>
Or
@php
print_r($students);
@endphp
And echo output as, for first row value
{{ $students[0]->name }}
And to print all student name in loop like this
@forearch($students as $key=>$student)
Name : {{$student->name}}
@endforearch
solved Method Illuminate\Database\Eloquent\Collection::__toString() must return a string value [closed]