Thanks for the answer.
I figured that i forgot the namespace in the repository.
When i added namespace App\Repositories;, the controller loaded the repository, but i couldn't use any other classes in the repository. However when i removed use App\Repositories\WebshopRepository as WebshopRepository;, it generates the old error, that the class does not exists.
When i try to implement @blackbird solution, it fails, and i get the class does not exists error. So i think it still isn't registered. But i can't figure out whats wrong..
My composer file looks like this, maybe there's something wrong with the loading of the repository folder?
{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework.",
"keywords": ["framework", "laravel", "lumen"],
"license": "MIT",
"type": "project",
"require": {
"laravel/lumen-framework": "5.0.*",
"vlucas/phpdotenv": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/",
"app/models/",
"app/Repositories/"
]
},
"autoload-dev": {
"classmap": [
"tests/"
]
},
"config": {
"preferred-install": "dist"
}
}
Sorry if it's a stupid question, but i'm really confused with the loading in Lumen at the moment...