Skip to content

Commit

Permalink
Merge pull request #6 from agungsugiarto/test-pagination-and-event
Browse files Browse the repository at this point in the history
WIP: Test pagination and event
  • Loading branch information
agungsugiarto authored Mar 4, 2022
2 parents 120dde3 + 28fca74 commit 0e98af6
Show file tree
Hide file tree
Showing 13 changed files with 1,082 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Events/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,6 @@ protected function createClassCallable($listener)
$method = '__invoke';
}

if ($this->handlerShouldBeQueued($class)) {
return $this->createQueuedHandlerCallable($class, $method);
}

$listener = new $class();

return [$listener, $method];
Expand Down
10 changes: 10 additions & 0 deletions src/Pagination/AbstractPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,16 @@ public function onFirstPage()
return $this->currentPage() <= 1;
}

/**
* Determine if the paginator is on the last page.
*
* @return bool
*/
public function onLastPage()
{
return ! $this->hasMorePages();
}

/**
* Get the current page.
*
Expand Down
Loading

0 comments on commit 0e98af6

Please sign in to comment.