A
A
AlexSer2019-08-23 09:07:39
Yii
AlexSer, 2019-08-23 09:07:39

How to properly organize user configuration data in Yii2?

My user has config data.

$organization
  $specialnost
  $root

Would it be correct to create a ConfigController and define these parameters in __construct(). and then already to all controllers to be inherited from this class?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gip, 2019-08-23
@AlexSer

The option is so-so. But what if you need this data outside of the controller?
If these are user attributes, then they should be in it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question