V
V
Vasyl Fomin2017-05-22 17:36:41
Laravel
Vasyl Fomin, 2017-05-22 17:36:41

Where, it would be more correct, to work with sessions (for example, through a facade), additional methods of working with data - in a controller or repository?

I am developing an application in which the session (Session facade) of the user is actively used to save intermediate data (the price of the selected product, country, currency ...), as well as methods for formatting and clearing the user data entered on the forms (phone number, name,, ..) .
The question arose, where is it more correct and better to write the code for using the session and functions for clearing and formatting data..., in the controller or in the repository?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question