Support the ongoing development of Laravel.io →
posted 8 years ago
Installation
Last updated 4 months ago.
0

The simplest way would be to create a "lib" directory in your app folder and add the class there, then add "app/lib" to the "classmap" section of your composer.json file. For example:

app/

----commands/

----controllers/

----database/

----lang/

----lib/

--------MyXmlParser.php

----models/

(etc)

	"autoload": {
		"classmap": [
			"app/commands",
			"app/controllers",
			"app/lib",
			"app/models",
			"app/database/migrations",
			"app/database/seeds",
			"app/tests/TestCase.php"
		]
	},
Last updated 4 months ago.
0

Sign in to participate in this thread!

Cloudways

Your banner here too?

vanpet vanpet Joined 10 Feb 2014

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.