S
S
shkiperoO2019-03-05 04:38:13
Laravel
shkiperoO, 2019-03-05 04:38:13

Problem with Laravel default pagination, how to solve?

In general, the point is that I display records from the database through the standard Laravel paginate () and render methods in the view, respectively.
Here is the code from the view

<section class="login_box_area section_gap">
        <div class="container">
            <div class="row">
            @foreach ($games as $game)
                <div class="col-lg-3 game-case">
                    <a href="{{ route(
                    'show_game',[
                    'game_id' => $game->game_id,
                    'slug' => str_slug($game->game_title)
                    ]
                    ) }}">
                    <h4>{{ $game->game_title }}
                    </h4>
                    <p><img src="{{$game->game_img}} "width="200" height="222" alt=""></p>
                    </a>
                </div>
            @endforeach
            </div>
        </div>
    </section>

    {{!! $games->render() !!}}
    @endsection

and I get the output like this misunderstanding
{{--
«
1
2
3
4
»
--}

According to the Laravel documentation, I wanted to make my own pagination view using
php artisan vendor:publish --tag=laravel-pagination
but in the console I get "Nothing to publish for tag [laravel-pagination]."

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Ukolov, 2019-03-05
@shkiperoO

What do you think the construction {{!!in Blade should do?

K
Konstantin B., 2019-03-05
@Kostik_1993

There 's a
misunderstanding in your
head
{!! $games->render() !!}

R
Roman, 2019-03-05
@procode

This is how it should be:
{!! $games->render() !!}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question