Ajvanho's avatar
Level 14

View [custom-pagination-links-view] not found.

I follow the docs but have an error:

<?php

namespace App\Http\Livewire;

use Livewire\Component;
use App\Models\Transaction;
use Livewire\WithPagination;

class AdminTable extends Component
{
	use WithPagination;

    public function render()
    {
        return view('livewire.admin-table', [
        	'transactions' => Transaction::paginate(25)
        ]);
    }

    public function paginationView()
    {
        return 'custom-pagination-links-view';
    }
}

// lw blade:
{{ $transactions->links() }}

// path:
// resource/livewire/custom-pagination-links-view.blade.php

0 likes
2 replies
MichalOravec's avatar
Level 75

Does resources/views/custom-pagination-links-view.blade.php file exist?

1 like
Ajvanho's avatar
Level 14

resource/livewire/custom-pagination-links-view.blade.php exist Therefore, the solution is:

public function paginationView()
    {
        return 'livewire.custom-pagination-links-view';
    }
1 like

Please or to participate in this conversation.