jucan's avatar
Level 1

Livewire Pagination on UI Tabs not working

I have a livewire pagination problem, please help. On first page the pagination is working fine. On clicking to the subsequent pages, nothing shows. My code is below

 public $perPage = 10;
   protected $paginationTheme = 'bootstrap';
    /**
     * Pagination View
     */
    public function paginationView()
    {
        return view('vendor.livewire.bootstrap');
    }
    public function mount($cl_id){
        
        $this->user_id=Cars::firstWhere('id', $cl_id)->user_id;
    }
   
    public function render()
    {
    
        return view('livewire.collection-management.case-management.metrics.cars-record',
        [
            'cars_metric' => CarsMetric::where('user_id',$this->user_id)->paginate($this->perPage)
        ]
    );
    }
0 likes
0 replies

Please or to participate in this conversation.