I wonder how does laravel load all the classes which was registered in config\app.php .
because I am trying to same thing with another project (non laravel framework) where I need to register module class by array. like this
class Module {
public function __construct()
{
$this->register();
}
public function register()
{
return [
\Modules\Quiz::class,
\Modules\Library::class,
\Modules\Payment::class,
];
}
}
Providers not for loading classes. Please look up spl_autoload_register on php.net
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.