PSR-4 autoloader Fatal error: Class not found
问题 I have my project structure like so: src/ ├─ Model/ └─ User.php My User.php file looks like this: <?php namespace Bix\Model; class User { And my composer.json autoloader is this: "autoload": { "psr-4": { "Bix\\": "src/" } } Finally my bootstrap.php is this: use Bix\Model\User; // PSR-4 Autoloader. require_once "vendor/autoload.php"; However if I try and create a new User() , I get the error Fatal error: Class 'User' not found in /var/www/public/api/v1/index.php on line 8 Looking at the