I agree that it is not clear where to store these classes in Laravel 4.
A simple solution would be to create repository / service folders in your main application / folder and update the main composer.json file to load them automatically:
{ "require": { "laravel/framework": "4.0.*" }, "autoload": { "classmap": [ "app/commands", "app/controllers", "app/models", "app/database/migrations", "app/tests/TestCase.php", "app/repositories", "app/services" ] }, "minimum-stability": "dev" }
Note: every time you create a new class, you need to run composer dump-autoload .
In the case of repositories, you can force Laravel to automatically enter them into your controllers. I find this good screencast on this.
source share