jeudi 29 octobre 2015

Where to put data for select boxes in Laravel?

If I have table in database like this:

users
    id
    username
    status

and status can be:

status 0 - not active 1 - active 2 - banned

where should I put statuses, i have some possibilities:

  1. in repository pattern for users
  2. in User Eloquent class
  3. in helpers
  4. in database (sometimes I would create 50 more tables for this and I dont think this is good idea)

?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire