forked from larastan/larastan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
HasManyThrough.stub
50 lines (45 loc) · 1.52 KB
/
HasManyThrough.stub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
namespace Illuminate\Database\Eloquent\Relations;
/**
* @template TRelatedModel of \Illuminate\Database\Eloquent\Model
* @extends Relation<TRelatedModel>
*/
class HasManyThrough extends Relation
{
/**
* Get the results of the relationship.
*
* @phpstan-return \Traversable<int, TRelatedModel>
*/
public function getResults();
/**
* Get a paginator for the "select" statement.
*
* @param int|null $perPage
* @param array<int, mixed> $columns
* @param string $pageName
* @param int|null $page
* @return \Illuminate\Pagination\LengthAwarePaginator<TRelatedModel>
*/
public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null);
/**
* Paginate the given query into a simple paginator.
*
* @param int|null $perPage
* @param array<int, mixed> $columns
* @param string $pageName
* @param int|null $page
* @return \Illuminate\Pagination\Paginator<TRelatedModel>
*/
public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null);
/**
* Paginate the given query into a cursor paginator.
*
* @param int|null $perPage
* @param array<int, mixed> $columns
* @param string $cursorName
* @param string|null $cursor
* @return \Illuminate\Pagination\CursorPaginator<TRelatedModel>
*/
public function cursorPaginate($perPage = null, $columns = ['*'], $cursorName = 'cursor', $cursor = null);
}