diff --git a/src/Illuminate/Database/Eloquent/Builder.php b/src/Illuminate/Database/Eloquent/Builder.php index 7887b339c125..bb3737175bab 100755 --- a/src/Illuminate/Database/Eloquent/Builder.php +++ b/src/Illuminate/Database/Eloquent/Builder.php @@ -1013,7 +1013,7 @@ public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $total = value($total) ?? $this->toBase()->getCountForPagination(); - $perPage = value($perPage, $total) ?? $this->model->getPerPage(); + $perPage = value($perPage, $total) ?: $this->model->getPerPage(); $results = $total ? $this->forPage($page, $perPage)->get($columns)