Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin routes #6

Open
umefarooq opened this issue Sep 15, 2013 · 3 comments
Open

admin routes #6

umefarooq opened this issue Sep 15, 2013 · 3 comments

Comments

@umefarooq
Copy link

HI you can make your admin routers more flexible

$route['admin/([a-zA-Z_-]+)/(:any)'] = 'admin_$1/$2';
$route['admin/login'] = 'admin/login';
$route['admin/logout'] = 'admin/logout';
$route['admin/([a-zA-Z_-]+)'] = 'admin_$1/index';
$route['admin'] = 'admin';

@ghost
Copy link

ghost commented Sep 15, 2013

Is these lines are matching?

I think this:

- $route['admin/([a-zA-Z_-]+)/(:any)'] = 'admin_$1/$2';
+ $route['admin/([a-zA-Z_-]+)/(:any)'] = 'admin/$1/$2';
$route['admin/login'] = 'admin/login';
$route['admin/logout'] = 'admin/logout';
- $route['admin/([a-zA-Z_-]+)'] = 'admin_$1/index';
+ $route['admin/([a-zA-Z_-]+)'] = 'admin/$1/index';
$route['admin'] = 'admin';

@umefarooq
Copy link
Author

you can use if you have admin directory under controller and every controller name in admin directory start with _ like _page then URL will be admin/page

admin_$1 i am using because in controller directory every admin controller start with admin_controllername

@ghost
Copy link

ghost commented Sep 15, 2013

Thanks about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant