Answer the question
In order to leave comments, you need to log in
Where to get data for controllers?
How to correctly place a function that goes to api for data? After receiving the data, they are needed in different controllers. Now it's just a trait that I include in every class. and have a function $this->getData();
Answer the question
In order to leave comments, you need to log in
https://laravel.com/docs/5.6/providers
https://laravel.com/docs/5.6/facades
well, or anywhere else "outside" the main thing is to register autoload in the composer and connect through use.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question