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:
- in repository pattern for users
- in User Eloquent class
- in helpers
- in database (sometimes I would create 50 more tables for this and I don't think this is good idea)
- in controller constructor and share it like "View::share('select', $usersStatuses);" i think this is not clean and elegant solution.
?
EDITED:
{!! Form::select('status', user_statuses(), @$user->status, array('class' => 'form-control')) !!}
Look at function "user_statuses()" where and how this should get data ?