Support the ongoing development of Laravel.io →
posted 10 years ago
Installation

I've two questions, Why the classmap directories defined in composer are also defined in global.php , like :

	"autoload": {
		"classmap": [
			"app/commands",
			"app/controllers",
			"app/models",
			"app/database/migrations",
			"app/database/seeds",
			"app/tests/TestCase.php"
		]
	},
ClassLoader::addDirectories(array(

	app_path().'/commands',
	app_path().'/controllers',
	app_path().'/models',
	app_path().'/database/seeds',

));

Second question is, Can I nest classes in sub-directories using this loading mechanism? or just first level classes can be autoloaded this way?

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

hollycoder hollycoder Joined 15 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.