1

I apologize for the broadness of this question but I am trying to implement my code in the best possible way and I'm wondering how others have approached this situation. I am building an application using Laravel4 and it will consist of a front-end and back-end. I am using Sentry for user management also.

Currently I store all of my controllers in the controller directory and likewise for the views however I am wondering If It would be better to store the controllers in subdirectories and then provide access to these sub directories using sentry?

In otherwords I'd store all of the Admin controllers like so

app->controllers->admin->nameofcontroller.php

and the User controllers like so

app->controllers->user->nameofcontroller.php

Gustavo Straube
  • 3,744
  • 6
  • 39
  • 62
Javacadabra
  • 5,578
  • 15
  • 84
  • 152
  • 1
    Why not separate different modules of the application in packages (http://laravel.com/docs/packages)? – Sergiu Paraschiv Aug 19 '14 at 09:42
  • 1
    That probably isn't necessary. It is your routes that provide access to your controllers. A better solution would be to implement some [Sentry based route filters](http://stackoverflow.com/questions/25383316/controlling-access-to-routes-laravel-and-sentry/25385852#25385852). Hope this helps. – c-griffin Aug 19 '14 at 17:58

0 Answers0