Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: CodeIgniter 4.0 is here!
Post: RE: CodeIgniter 4.0 is here!

Congratulations to the whole team! Good job!
234,681 Views
131 Replies
03-10-2020, 07:19 AM
milengardev1994
    Thread: Hooks on controller methods
Post: RE: Hooks on controller methods

The example that I give it was to briefly explain what is the issue that I am having. Of course, there is more logic in the controller but I strip it to make it more clear, apparently not very succes...
6,557 Views
5 Replies
10-12-2019, 03:56 PM
milengardev1994
    Thread: Hooks on controller methods
Post: RE: Hooks on controller methods

Well I do get your suggestion however my problem is about repeating 'exist' on every function that 'exist' is required. In other frameworks there is the concept of middleware where you can intercept ...
6,557 Views
5 Replies
10-12-2019, 06:01 AM
milengardev1994
    Thread: Hooks on controller methods
Post: Hooks on controller methods

Hello, I have been building RESTful API using CI 3 and I have came to a situation where there is a lot of duplicated code so I was thinking if it's possible to achieve something like a hook on a func...
6,557 Views
5 Replies
10-11-2019, 02:06 PM
milengardev1994
    Thread: Make a normal translation for a site similar to Laravel
Post: RE: Make a normal translation for a site similar t...

There are many ways of implementing translations. In fact, in Laravel you can do it also in couple of ways. You can always create a static helper class e.g TextHelper and based your translations provi...
4,526 Views
4 Replies
10-10-2019, 09:17 AM
milengardev1994
    Thread: Validation in controllers
Post: RE: Validation in controllers

Thank you for the answers. I have checked all your suggestions.  For me it seems that the validation should be done in the model and as far as I see that how is also suggested in CI4. Regards,
11,514 Views
10 Replies
09-14-2019, 11:59 PM
milengardev1994
    Thread: Validation in controllers
Post: Validation in controllers

Hello all, I have some general best practices question about how to handle validation.  As far as my knowledge gets we do form validation in the controller. For example, to check if certain fields ar...
11,514 Views
10 Replies
09-05-2019, 09:15 AM
milengardev1994
    Thread: Custom routes
Post: RE: Custom routes

You can try something like this: Code: -- $route['login/(.+)'] = 'auth/login/$1'; -- This is will capture all segments after 'login'.  I would be a bit hesitant to use it since if you hav...
5,145 Views
5 Replies
09-01-2019, 12:45 PM
milengardev1994
    Thread: Why Codeigniter is better than laravel?
Post: RE: Why Codeigniter is better than laravel?

I am using CI since 2016 for building various small projects and now recently using it on quite big projects. For small project - website with a registration form, login and some basic HTML pages i...
50,827 Views
25 Replies
09-01-2019, 12:35 PM
milengardev1994
    Thread: How to log actions?
Post: RE: How to log actions?

I would suggest to write your own logging function for each function in the controller. I guess you also want to log specific input in the controller functions.
5,749 Views
5 Replies
09-01-2019, 12:12 PM
milengardev1994
    Thread: How can I display a Codeigniter 3 pagination as JSON?
Post: RE: How can I display a Codeigniter 3 pagination a...

I don't think this will work out. Code: -- $this->pagination->create_links() -- This code as far as I know only generates HTML template.  I had a similar issue and I have created custom library t...
2,994 Views
1 Replies
08-31-2019, 12:09 PM
milengardev1994

Theme © iAndrew 2016 - Forum software by © MyBB