I am getting this error while paginating from one page to another page.
when I click on the 2 number link following error occurs.

**Call to a member function links() on array**
**FUNCTION**

```
 $data = tbl_company::query()
                ->where(
                    "company_name",
                    "LIKE",
                    "%{$req->company_name}%"
                )->paginate(100);
            return view('/admin/company/index', compact('data', 'showPagination'));

```

**BLADE.FILE**

```
 {{$data->links()}}

```