Enhance Nova Resource Stubs to Support Type-Hinted Models #6780
Unanswered
nastoychev
asked this question in
Ideas & Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Nova Team,
I would like to propose an enhancement to the default Nova Resource stubs to include proper type hints for associated models. This would improve IDE auto-completion, static analysis (PHPStan/Psalm), and developer experience when working with Nova resources.
🚀 Proposed Stub Enhancement
Currently, Nova’s default stubs for resources do not include generic model type annotations, making it harder to get accurate type hints in IDEs.
I suggest updating the stub to include:
✅Benefits of This Change
$this->resource
and$this->model()
properly recognized as an instance of the associated model.Beta Was this translation helpful? Give feedback.
All reactions