Answer the question
In order to leave comments, you need to log in
Problem with running Laravel project on Windows7 (possibly slashes and/or autoload)?
Apache 2.4.7 - PHP 5.5.6 - MySQL 5.6 stack is installed and running on the machine.
Project updated by Composer, launched by artisan.
Each time localhost:8000 is accessed, an error like
PHP Fatal error: Trait 'helpers\HelperTrait' not found in D:\project\app\models\Article.php on line 5
Answer the question
In order to leave comments, you need to log in
See how the composer autoloader works. The composer generates a class map in the vendor/composer folder (if I'm not mistaken). You can check the correctness of the paths there. Once I had a problem, with autoload too. But it was a little different, everything worked on my machine (win7), but not on the combat server (linux). I searched for a problem for a long time, until I started digging the paths where the composer searches for files. The decision turned out to be banal - windows case insensitive, and linux case sensitive. Those. my class load folder was called classes, and the namespace for all classes began with \Classes. The problem was solved by renaming the classes folder to Classes
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question