top-think / top-think/think-orm

分页时为啥一定要去掉后面的斜杠

Open
#189 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
437
Forks
188
PR merge metrics
No merged PRs in 30d

Description

https://github.com/top-think/think-orm/blame/b608205c03a6360cd961a61c95abcae9d2572dcd/src/Paginator.php#L105

分页链接为啥一定要去掉结尾的斜杠。

我站点所有链接都是以斜杠结尾的。分页去掉尾部的斜杠,导致我路由匹配不成功。

我除了注释掉这行,还有其他更好的解决办法吗?

或者这里可以做成配置可控的吗?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/Paginator.php around line 105 and trace how pagination URLs are assembled and why the trailing slash is removed. Decide how the behavior should be exposed as configuration without breaking existing links, then verify that generated URLs preserve or remove the slash according to that setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.