FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

add method resolveTableName, support model input by tw2066 · Pull Request #7551 · hyperf/hyperf · GitHub

/ hyperf Public

add method resolveTableName, support model input - #7551

Open
tw2066 wants to merge 2 commits into
hyperf:masterfrom
tw2066:validation-model
Open

add method resolveTableName, support model input#7551
tw2066 wants to merge 2 commits into
hyperf:masterfrom
tw2066:validation-model

Conversation

tw2066 commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

使用模型来确定表名称

unique:table,column
验证字段在给定的数据库表中不得存在。

指定自定义表/列名称:

您可以指定应使用哪个 Eloquent 模型来确定表名称,而不是直接指定表名称:

'email' => 'unique:App\Models\User,email_address'

您可以指定应使用哪个 Eloquent 模型来确定表名称,而不是直接指定表名称:

'user_id' => 'exists:App\Models\User,id'

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL