Answer the question
In order to leave comments, you need to log in
Where to put a file with a set of methods in laravel?
You need to make a component, let's say so in one file.
It will have a set of methods for working both in cron and through controllers.
Where to put this file, in what folder and from what to inherit.
In yii2 it would be a component, it would be in the components folder.
Answer the question
In order to leave comments, you need to log in
It doesn't matter where the file is stored. You can create a new folder and put what you need there. The main namespace is correct to register.
Afatar wrote in principle correctly. You can get any framework feature almost anywhere. And it is not necessary to inherit something from something like yii.
There is an app helper here https://laravel.com/docs/5.4/container , native facades
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question