ingeniasoftware / luthier-ci

Improved routing, middleware support, authentication tools and more for CodeIgniter 3 framework
https://luthier.ingenia.me/ci/en/
MIT License
150 stars 38 forks source link

Add autoRoute setting + allow multiple params in segments parts #37

Closed hostekevin closed 5 years ago

hostekevin commented 5 years ago

Hello :),

I add feature for my personal use.

I need to access to controllers/methods without defining route, so i set a param autoRoute to enable/disable feature 👍

Route::setAutoRoute(true);

I also add the possibility to use multiple param in url, or use param with text concatenation :

Route::get('{url}.html', 'Main@page');
// or
Route::get('blog/{id}-{url}.html', 'Main@blog');

Give me a feedback if you find this interesting.

andersonsalas commented 5 years ago

Hi @Kevkehz, thanks for your contribution! 😄

@julidagx let's review this, what do you think?

julidagx commented 5 years ago

Hi @Kevkehz!, your code it's really good, i have no problems in adding it to our repository

hostekevin commented 5 years ago

Cool :)

This seems to work for the Web route, but I have not tested every case like CLI or resources. I will try to do more testing to be sure.

But I think it can be useful to work on these features.