At the minute you're trying to print a Collection/Array which will throw an array to string conversion error. Use print_r($lead) or var_dump($lead) to see whats in the Collection/Array to use.
Are you using migrations and setup some models? That might help make more sense of how laravel works rather than using the DB facade.
<table>
@foreach($leads as $lead)
<tr><td>{{$lead->name}} - {{$lead->created_at}}</td></tr>
@endforeach
</table>
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community