hello there, I have a question, I recently tried elixir and am very interested in the concept and how it works, whatever it may be. I come from a php background, especially Laravel, I want to ask about ecto, is there the same way of appending an attribute to @current_user in Phoenix like the Laravel method by using an attribute in the model? so that I don’t have to make much trouble in this matter, maybe that’s all.
I don’t really understand what you mean, can you provide an example of an attribute you would add to current user, and how that attribute would be used?
I think the discussion is about fetching current user from a controller?
I mean there are different ways of storing reference to the current user, however we use Plug, think of it as a callback that you can add in any place when the request is processed and execute logic. In your case you could add the plug exactly before the controller logic and fetch there the user into assigns.