Answer the question
In order to leave comments, you need to log in
How to display data from a table using Laravel via QueryBuilder or Raw Query?
There was a problem when displaying data from the database, what could be the error?
Marchut
Route::get('/', function () {
$users = DB::table('client')->get();
return view('welcome',compact('client'));
});
<ul>
@foreach
($users as $user)
<li>{{ $user->fio}}</li>
@endforeach
</li>
Answer the question
In order to leave comments, you need to log in
Who will transfer users to the template?
And foreach on one line with brackets.
Copy the documentation and compare.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question