Is it a best practice to have edit and create actions in same view?
In my previous project using Laravel, I've played a lot with RESTful and
realized that I used some repeated logic in 'edit' and 'create'
controllers and also many 'html' in views. Then I came up with merging
them into one file to avoid repeats. However, I found that doing so would
somehow mess things up as I had to add lots of logic.
So, what is the best practice here? Do your guys usually separate them
into two files or using a same file more often?
No comments:
Post a Comment