Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Auto Routing Improved doesn't work for getIndex with parameters
Post: RE: Auto Routing Improved doesn't work for getInde...

My bad. When I just discovered CodeIgniter I didn't know it already has a pagination class. https://codeigniter.com/user_guide/libraries/pagination.html
915 Views
3 Replies
01-25-2023, 09:07 PM
Rinart
    Thread: How to make CSRF tokenRandomize = true work with multiple tabs?
Post: RE: How to make CSRF tokenRandomize = true work wi...

Ok my bad. "tokenRandomize" doesn't change the actual value of the token, it 'masks' it to prevent BREACH attacks. "regenerate" generates new token after every non-GET request. I found out that d...
889 Views
2 Replies
01-25-2023, 09:01 PM
Rinart
    Thread: How to make CSRF tokenRandomize = true work with multiple tabs?
Post: How to make CSRF tokenRandomize = true work with m...

I have a /client/edit/id page that has a POST form. It works just fine on its own but if I open several tabs for editing all tabs except for the last one will result in "This action is not allowed". ...
889 Views
2 Replies
01-25-2023, 04:38 PM
Rinart
    Thread: How to make a Helper/Service that would be included with composer and autoloaded?
Post: How to make a Helper/Service that would be include...

I'm in the process of making a Library (a single php class atm) that handles some document-related stuff. I'm also adding a Helper that allows for quick access to some of the Library features (mainly ...
3,964 Views
1 Replies
01-24-2023, 06:28 AM
Rinart
    Thread: When to put code in Controller and when in Model
Post: RE: When to put code in Controller and when in Mod...

kenjis Wrote: (01-21-2023, 07:02 PM) -- Rinart Wrote: (01-21-2023, 10:42 AM) -- Photo upload and validation should be done in Controller and the Model should only handle final database interaction. ...
2,230 Views
4 Replies
01-21-2023, 07:26 PM
Rinart
    Thread: When to put code in Controller and when in Model
Post: When to put code in Controller and when in Model

MVC pattern seems quite clear but sometimes I'm not sure where certain things should go - controller or model. Examples that feel clear enough: I want to fetch an order I also want to JOIN it with ...
2,230 Views
4 Replies
01-21-2023, 10:42 AM
Rinart
    Thread: RESTful and auto routing improved
Post: RE: RESTful and auto routing improved

So basically Auto Router Improved doesn't support the example from the Docs and the way to go is to define routes for api manually? Code: -- $routes->resource('photos'); // Equivalent to the fo...
1,179 Views
6 Replies
01-21-2023, 07:18 AM
Rinart
    Thread: RESTful and auto routing improved
Post: RESTful and auto routing improved

I have a controller App/Controllers/Api/Orders.php Code: --
1,179 Views
6 Replies
01-20-2023, 06:54 PM
Rinart
    Thread: Model validation - localized labels
Post: Model validation - localized labels

I'm trying to validate input data when creating a new client but I want to properly display localized messages along with the field names: Code: -- // Validation protected $validationRules      =...
505 Views
1 Replies
01-19-2023, 10:08 AM
Rinart
  Question Thread: Auto Routing Improved doesn't work for getIndex with parameters
Post: Auto Routing Improved doesn't work for getIndex wi...

I enabled Auto Routing improved and trying to follow the manuals. I want to add pagination to my clients list: /clients/13 - page 13 /clients/1 - page 1 Code: --
915 Views
3 Replies
01-17-2023, 10:16 AM
Rinart

Theme © iAndrew 2016 - Forum software by © MyBB