Skip to content

Conversation

@Nima8FT
Copy link
Contributor

@Nima8FT Nima8FT commented Nov 1, 2025

Summary

Replaced all usages of auth()->user() with proper dependency injection to improve testability and architecture.

Changes

  • Updated controllers to inject Authenticatable or User instead of using global auth() helper.
  • Ensured all routes using these controllers are protected by auth middleware.

Fix #344

coderabbitai[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

@gomzyakov gomzyakov changed the title Fix #344 - Replace auth()->user() with Dependency Injection Replace auth()->user() with Dependency Injection Nov 12, 2025
Repository owner deleted a comment from coderabbitai bot Nov 15, 2025
@gomzyakov gomzyakov merged commit 262525b into gomzyakov:main Nov 15, 2025
4 checks passed
@gomzyakov
Copy link
Owner

@Nima8FT Thank for your contributions!

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.

Replace auth()->user() to DI

2 participants