This is a repeat question - eg:
Laravel 4 migrations - class not found
However, I've tried every solution (from every forum I could find) and cannot figure this out.
Scenario
I created a Laravel 4 project on my local machine - added some classes, controllers, views, etc - the project works great.
I then copy this fresh repo onto my DO server - install dependencies with composer, etc. The project looks good, except for one page that shouts an error:
Class 'company' not found
Symfony\Component\Debug\Exception\FatalErrorException
…/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php593
You can view this page here.
I've tried...
I've updated composer. I've tried "dump-autoload". I changed the 'minimum-stability' to 'stable' in the composer.json file (yes, this was a proposed solution on a forum post).
Other solutions have to do with adding "psr-4" or "psr-0" into the composer.json file depending on the composer version - tried both.
What boggles my mind about this the most, is that this page works great on my local machine, but not on the DO server....If you guys need more info about something to fish this answer out, just let me know.
Any help is appreciated :)
this is what my composer.json file looks like:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.0.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}