Skip to content

Fix: config (Roster tenant_id fillable / RoleManager Roster model)#1

Open
artemsky wants to merge 1 commit intohdaklue:masterfrom
artemsky:fix/config
Open

Fix: config (Roster tenant_id fillable / RoleManager Roster model)#1
artemsky wants to merge 1 commit intohdaklue:masterfrom
artemsky:fix/config

Conversation

@artemsky
Copy link
Copy Markdown

@artemsky artemsky commented Jan 18, 2026

  • Roster model now fully configurable (RoleManager)
  • Fix tenant_column config issue in Roster model

Summary by CodeRabbit

  • Refactor
    • Model configuration is now resolved dynamically at runtime. Roster model references and fillable attributes can be configured through application settings.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 18, 2026

📝 Walkthrough

Walkthrough

The pull request introduces configuration-driven model resolution by replacing static hardcoded references to the Roster model with dynamic resolution via a new private method. Additionally, the Roster model's fillable fields are now determined dynamically, including a configurable tenant column sourced from configuration.

Changes

Cohort / File(s) Summary
Model Configuration
src/Models/Roster.php
Replaced static $fillable property with dynamic getFillable(): array method that returns base fields plus a configurable tenant column from config
Dynamic Model Resolution
src/RoleManager.php
Introduced resolveRosterModel(): string private helper method; replaced all direct Roster:: static calls with dynamic resolution pattern (e.g., $this->resolveRosterModel()::firstOrCreate(...)) across query, creation, and deletion operations

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Static chains are breaking free,
Config whispers: "resolve with me!"
Roster dances, light and spry,
Through dynamic paths it now can fly! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the two main changes: making the Roster model's tenant_id fillable via configuration and making RoleManager use a configurable Roster model.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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