In my laravel project I created a model called CustomerLinks
. The model resides in the app/models
folder. My composer file has an autoload of:
If you are not within a namespace (i.e. you are in the root namespace), and the class you want to use also is not in a namespace (i.e. also in the root namespace), then using use
makes no sense, because the code will work the same without it. You are not importing anything with this statement.
Composer has nothing to do with this, neither has any other autoloading. It's how PHP works by itself.