Thursday, June 27, 2024
No menu items!
Google search engine
HomeLaravelWhat is the use of Composer dump-autoload in laravel?

What is the use of Composer dump-autoload in laravel?

The composer dump-autoload will not download anything new, all it does is discovers all the classes and files it needs to include again.

It’s recommended to run the command when you create a new controller, helper functions, models.

Composer autoloader has two ways of locating a class. First it looks in it’s generated class map, if that doesn’t exist or it can’t find the class, it’ll do a filesystem lookup.

When you didn’t regenerate the class map it’ll use the slower filesystem lookup. For development this isn’t an issue, but you wouldn’t want that to happen on production. It wouldn’t even work if your production env is installed with authoritative class map.

composer dump-autoload
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments