[eluser]esra[/eluser]
You can also do this:
Code:
application/
application/admin/
application/admin/config/
application/admin/hooks/
application/admin/language/
application/admin/models/
application/admin/plugins/
application/admin/views/
application/config/
application/hooks/
application/language/
application/models/
application/plugins/
application/views/
system/
.htaccess
admin.php
index.php
The advantage here is that multiple applications could still exist by creating folders for them under application/, each with its own admin.
Is it possible to use include() or require() within a CI model file? Never tried it, but someone might try creating a file called something like user_proxy_model.php in admin/models/ and try to include or require a model file from the frontend using BASEPATH.application/models/user_model.php. Then try to load the proxy file from a controller to see if the actual model loads or an error occurs.
An alternate approach would be to extend Loader.php (MY_Loader.php) and overload the model() method to search for models across multiple paths.
---
I myself use Matchbox, but do include an admin/ subfolder under controllers/ for most modules. I prefix the filenames with admin which looks ugly in the file system, but the class names look nice using Camelcase (e.g., Article for a frontend controller and AdminArticle for a backend controller.