the SO article suggests you have 2 tables and create a relationship between (lookup Eloqunt Relationships in the docs)
I think it's better, like somebody suggests on SO, to keep everything in one table. The flow will be like
user creates new article, type = draft
admin presses publish, type changed to published
user edits existing article with type published and when the user presses save a new article is created with type = draft and parent_id to the id of the original article
admin presses publish, the original article is updated with the data from the draft and the draft is discarded
something like that
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community