Forum Laravel Users List from database using query builder
I have the user list spitting out in an array. I just need help formatting it, so it appears in a list/prettier format.
My code...
My Route Route::get('/users', '[email protected]');
Route::get('/users', '[email protected]');
My Controller function
$users = DB::table('users')->get(); return view('user.index', ['users' => $users]); } //My Blade file ```<h1>List of All Users</h1> @forelse($users as $user) <li>{{ $user->name }}</li> @empty }```
Please sign in or create an account to participate in this conversation.
There's no shortage of content at Laracasts. In fact, you could watch nonstop for days upon days, and still not see everything!
Get Started
Users List from database using query builder
I have the user list spitting out in an array. I just need help formatting it, so it appears in a list/prettier format.
My code...
My Route
Route::get('/users', '[email protected]');
My Controller function