I have developed API using Lumen framework and using separately created composer package which I'm planning to use both on Lumen (API) and Laravel (Web site).
However I get:
Class 'Author\Package\Models\ProductItem' not found
Locally everything is working (using same Apache and PHP version). My directory structure is:
|
\_ api (Lumen code)
|
\_ model\
| \_ src\
| | \_ migrations\
| | |
| | \_ models\
| | | \_ ProductItem.php
| | |...
| |
| \_ composer.json
|
\_ www (Laravel code)
in api\composer.json
I have:
...
"autoload": {
"psr-4": {
"App\\": "app/",
"Author\\Package\\": "../model/src"
}
},
...
Only difference between local and hosting configuration is version of Composer (local is 1.5.2 and remote is 1.4.2).