<?php

namespace App\Components;

use Livewire\Component;
use Livewire\WithPagination;

class History extends Component
{
    use WithPagination;

    public $owner;

    public function render()
    {
        return view('components.history', [
            'history' => $this->owner
                ->history()
                ->latest()
                ->paginate(10, ['*'], 'historyPage'),
        ]);
    }
}
