0

I'm new to Laravel 5 and I have an issue displaying pagination. I looked in the documentation and just can't get it to work.

usercontroller:

public function getIndex()
{
    $users = User::where('active', '=','verified')->simplePaginate(10);
    return View::make('User.index')->with('users',$users);
}

index.blade.php:

<table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th>id</th>
                    <th>username</th>
                    <th>email</th>
                    <th>role</th>
                    <th>created</th>
                    <th class="actions">Actions</th>
                </tr>
                </thead>
                <tbody>
                @foreach($users as $user)
                    <tr>
                        <td>{{ $user->id }}</td>
                        <td>{{ $user->username }}</td>
                        <td>{{ $user->email }}</td>
                        <td>{{ $user->role }}</td>
                        <td>{{ $user->created_at }}</td>
                        <td class="actions">
                            blabla
                        </td>
                    </tr>

                @endforeach
                </tbody>
            </table>
{!! $users->render() !!}
user3813360
  • 566
  • 9
  • 25

1 Answers1

0

for some reason, it was printing an additional /

fix:

{!! str_replace('users/','users',$users->render()) !!}
user3813360
  • 566
  • 9
  • 25