mardi 26 janvier 2016

Eloquent best way to deal with unpublished content

I'm trying to deal with a case where the columns in one of my tables have a status, which is either draft or published.

Is there an easy way to specify somehow in the model that it should only get the published ones by default?

It would be great if I could get the drafts too with some condition.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire