改名
This commit is contained in:
@@ -7,8 +7,6 @@ namespace Database;
|
|||||||
use Closure;
|
use Closure;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Snowflake\Abstracts\Component;
|
use Snowflake\Abstracts\Component;
|
||||||
use Snowflake\Event;
|
|
||||||
use Swoole\Coroutine;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Pagination
|
* Class Pagination
|
||||||
@@ -190,7 +188,7 @@ class Pagination extends Component
|
|||||||
*/
|
*/
|
||||||
private function get(): Collection|array
|
private function get(): Collection|array
|
||||||
{
|
{
|
||||||
if ($this->_length + $this->_limit > $this->_max) {
|
if ($this->_max > 0 && $this->_length + $this->_limit > $this->_max) {
|
||||||
$this->_limit = $this->_length + $this->_limit - $this->_max;
|
$this->_limit = $this->_length + $this->_limit - $this->_max;
|
||||||
}
|
}
|
||||||
$data = $this->activeQuery->limit($this->_offset, $this->_limit)->get();
|
$data = $this->activeQuery->limit($this->_offset, $this->_limit)->get();
|
||||||
|
|||||||
Reference in New Issue
Block a user