Reputation:
In Laravel 3.2 I created a business logic namespace (folder) inside the application folder. Then I used the Autoloader to register the new namespace.
I want to do the same in Laravel 4 - I want to create custom namespace for my business logic. How do I register my business namespace and make available to the IoC?
Upvotes: 1
Views: 1926
Reputation: 121
@Miguel Martinez to keep your controllers skinny you can put your business logic in models also.
Upvotes: 0
Reputation: 1039
According to the laravel documentation controllers should contain business logic: http://laravel.com/docs/controllers
Upvotes: -1
Reputation: 1766
you can add any arbitrary folder in the app dir. Just be sure to add it to the "classmap" in you composer.json file. L4 doesn't scan for files/directories, it just looks to see what names have been loaded in the autoloader
Upvotes: 4