Hey everyone,
I have created a custom folder (for custom classes etc) my autoload class map looks like this
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/tests/TestCase.php",
"app/Custom"
]
},
I am trying to access Custom\Select\Select() My file structure looks like this Custom Select Select.php interfaces
and in Select.php I have
<?php
namespace Custom\Select;
class Select implements Custom\Select\interfaces\Select {
I have run composer dump -o to reload the autoloader but I am getting Class 'Custom\Select\Select' not found when I try to run it.
Any ideas would be awesome (I am not used to composer - working with Laravel is the first case I have used it) Cheers Colin
If you're using namespace
you are better of using the psr-4
autoloader.
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/tests/TestCase.php"
],
"psr-4": {
"Custom\\": "app/Custom"
}
},
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community