Support the ongoing development of →
Configuration Packages Architecture
Last updated 2 years ago.

You put stuff where you want in Laravel. It doesn't constrain you to a certain folder structure to put things into. As long as your classes are auto-loaded by composer then you are good to go.

I personally put my front-end stuff into app/ while making a new folder in the project root which is the projects name "Acme" for instance. I then use a PSR loading scheme on that and start coding. So Acme/Controllers/ is my backend controllers, Acme/Shop/Product is my product modal, etc.

Just make up what you want, autoload it, and set yourself free from being told where to put what all the time.

Last updated 2 years ago.

Like in Codeigniter

I have follow this :-

So I think now you have clear my query.

Last updated 2 years ago.

Maybe this will help: Modules in Laravel 4

Last updated 2 years ago.

i am building it this way.

i use sub-domains in the routers.

Then on the controllers i have controller/backend controller/frontend

Views: /views/frontend/ views/backend/

very basic as you can see

Last updated 2 years ago.

Hello Extjac,

I want to do it like :-

For admin panel :-

and for front end :-

And in controllers, models and views folder both are in separate folder. And both folder can contain the same name of class.

Last updated 2 years ago.

You probably are over thinking this...It is actually very simple.

I would create this folder and files structure:

#Models keep it simple

#break controllers into two folders
#(make sure you update the /app/start/global.php with the folder structure

#front end views samples

#backend views samples


#Front-end controller location /app/controller
#file name: UserController.php


class UserController extends Controller 
 public function getLogin()
  return View::make('login.index');


#Backend-end controller location /app/controller/admin
#file name: AdminUserController.php


class AdmiinUserController extends Controller 
 public function getLogin()
  return View::make('admin.login.index');
 # Note that this view is pointing to the /views/admin/ folders


In the routers.php I do it this way:

#sample front end controller
Route::get('/login', 'UserController@getLogin');	

#sample of admin controller
Route::get('/admin/login', 'AdminUserController@getLogin');	

Unless I am missing your point, this is how i would do it.

Last updated 2 years ago.

Sign in to participate in this thread!


Your banner here too?

prattsparx prattsparx Joined 16 Apr 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.