-
-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor #31
Refactor #31
Conversation
'display_name' => $request->display_name, | ||
'description' => $request->description, | ||
]); | ||
$role->update($request->only(['name', 'display_name', 'description'])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even thought this may seems a good refactoring, sometimes the raw model could not have a 1:1 match with a form fields name.
I think the old way it's better right now because one simple thing:
- Controllers are not backed-up by tests
Feel free to close this if you do not like it. |
The problem is not whether I like or not, it's about bring logic to refactors. Refactoring an untested code is always risky |
Agree with what @ludo237 mentioned, personally want to refactor many parts of the code. On my list to review complete code and plan out refactoring in the best possible way. @imanghafoori1 closing this for now |
refactor to reach fewer lines of code