Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Cache-Control header always prepend "no-store, no-cache, must-revalidate"
Post: RE: Cache-Control header always prepend "no-store,...

parisiam Wrote: (08-22-2023, 03:00 PM) -- The solution is to stop theses headers from being issued BEFORE the session starts by using `session_cache_limiter('');`: PHP Code: -- // We prevent PHP fr...
754 Views
7 Replies
03-01-2024, 06:32 AM
bgeneto
    Thread: Server Push/preloading?
Post: RE: Server Push/preloading?

I would like to see Early Hints (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103) support in a (near) future CI4 version. I think this should be straightforward to implement using setHead...
1,409 Views
6 Replies
02-12-2024, 11:56 PM
bgeneto
    Thread: How to setup a single route with optional argument
Post: RE: How to setup a single route with optional argu...

kenjis Wrote: (12-14-2023, 04:47 PM) -- I have re-read the user guide and this description and the current behavior still do not match. It is natural that the string that matches (.+) would be the o...
913 Views
15 Replies
12-15-2023, 05:22 AM
bgeneto
    Thread: How to setup a single route with optional argument
Post: RE: How to setup a single route with optional argu...

kenjis Wrote: (12-14-2023, 04:02 AM) -- Out of curiosity, why don't you send a pull request to update the docs? -- Only because I never remember where the documentation source code is. So I will po...
913 Views
15 Replies
12-14-2023, 06:16 AM
bgeneto
    Thread: How to setup a single route with optional argument
Post: RE: How to setup a single route with optional argu...

ozornick Wrote: (12-13-2023, 10:51 PM) -- Why is the two route option not suitable for you? It's 100% working. You need to determine the required parameter based on the request -- It's not that the...
913 Views
15 Replies
12-14-2023, 03:47 AM
bgeneto
    Thread: How to setup a single route with optional argument
Post: RE: How to setup a single route with optional argu...

kenjis Wrote: (12-08-2023, 05:25 PM) -- > the last parameter is optional (the class method has a default value in its second parameter) There is no such feature now. PHP Code: -- $routes->get(...
913 Views
15 Replies
12-13-2023, 03:15 PM
bgeneto
    Thread: How to setup a single route with optional argument
Post: How to setup a single route with optional argument

Hi!  I'm trying to setup a single route that allows a second optional argument like this: Code: -- $routes->get('user_details/(:num)/(:any)?', 'MyClass::userDetails/$1/$2'); -- It works with two ...
913 Views
15 Replies
12-08-2023, 03:31 PM
bgeneto
    Thread: Using 404 Override won't trigger 404 header
Post: RE: Using 404 Override won't trigger 404 header

sammyskills Wrote: (11-27-2023, 05:59 AM) -- You are correct @"kenjis" , it should return 404 response by default. -- I fully agree. And I couldn't find a reason on the matter looking at the source...
357 Views
6 Replies
11-28-2023, 05:10 PM
bgeneto
    Thread: Using 404 Override won't trigger 404 header
Post: RE: Using 404 Override won't trigger 404 header

kenjis Wrote: (11-24-2023, 08:46 PM) -- See https://codeigniter4.github.io/CodeIgniter4/incoming/routing.html?highlight=404#override -- Oh my... I should not have missed that crucial note! I apprec...
357 Views
6 Replies
11-27-2023, 05:43 AM
bgeneto
    Thread: Using 404 Override won't trigger 404 header
Post: Using 404 Override won't trigger 404 header

How can I add a 404 not found header to this code? $routes->set404Override(static function () {     return view('admin/others/error-page/error-404'); }); The problem with the code above is that ...
357 Views
6 Replies
11-24-2023, 04:23 PM
bgeneto
    Thread: Can I use session()->push in a model?
Post: RE: Can I use session()->push in a model?

JustJohnQ Wrote: (11-07-2023, 11:22 AM) -- According to the documentation: https://codeigniter4.github.io/userguide/libraries/sessions.html?highlight=push#pushing-new-value-to-session-data -- It's s...
258 Views
2 Replies
11-08-2023, 05:22 AM
bgeneto
    Thread: Can I use session()->push in a model?
Post: Can I use session()->push in a model?

I'm using CodeIgniter 4.4.3 and I would like to know if it is still valid to use session()->push() in a model that extends BaseModel.  It seems that we can't use session()->get() anymore, but I thi...
258 Views
2 Replies
11-07-2023, 07:08 AM
bgeneto
    Thread: Codeigniter docs correction - routing
Post: Codeigniter docs correction - routing

I think that the following statement contained in the docs here https://www.codeigniter.com/user_guide/incoming/routing.html?highlight=routing#array-callable-syntax (https://www.codeigniter.com/user_g...
374 Views
2 Replies
10-11-2023, 05:45 AM
bgeneto
    Thread: Headers not properly set with response->setContentType
Post: RE: Headers not properly set with response->setCon...

ozornick Wrote: (09-28-2023, 09:37 AM) -- Not send json raw. Send your response as "return $this->response->setJson(...)" You not applied response in controller, this not work. -- Unfortunately...
397 Views
2 Replies
09-28-2023, 11:32 AM
bgeneto
    Thread: Session Flashdata Persisting Like Normal Session Data
Post: RE: Session Flashdata Persisting Like Normal Sessi...

ltarrant Wrote: (09-28-2023, 05:41 AM) -- Hi, I currently have an issue with Flashdata persisting and behaving like normal session data. This occurs with direct use of Flash data like: Code: -- $...
389 Views
4 Replies
09-28-2023, 07:52 AM
bgeneto
    Thread: Headers not properly set with response->setContentType
Post: Headers not properly set with response->setContent...

Any ideas why setting headers like this doesn't work: Code: -- $this->response->setContentType('text/event-stream')  -- but using like this works? Code: -- header('Content-Type: text/event-stream...
397 Views
2 Replies
09-28-2023, 05:55 AM
bgeneto
    Thread: Liveview / livewire
Post: RE: Liveview / livewire

What about @lonnieezell Cellular project? https://github.com/lonnieezell/cellular It seams promising and a great addition to Codeigniter framework.
4,309 Views
7 Replies
07-22-2023, 09:39 AM
bgeneto
    Thread: DataException: There is no data to update after using save()
Post: RE: DataException: There is no data to update afte...

kenjis Wrote: (06-01-2023, 02:06 AM) -- There is hasChanged() method in Entity. https://codeigniter4.github.io/CodeIgniter4/models/entities.html#checking-for-changed-attributes The method may retur...
2,212 Views
10 Replies
06-02-2023, 08:07 AM
bgeneto
  Exclamation Thread: DataException: There is no data to update after using save()
Post: DataException: There is no data to update after us...

I would like to discuss a very common situation that often arises: 1. A user updates their profile information in a form on the view page. 2. The controller receives the posted data, fills the pro...
2,212 Views
10 Replies
05-26-2023, 07:35 AM
bgeneto
    Thread: How debug Tutorial - News section to pass "We seem to have hit a snag. ..."
Post: RE: How debug Tutorial - News section to pass "We ...

The same message is appearing now at codeigniter.com as they migrate the site to CI4. I think it's some kind of bug in the latest build.
7,565 Views
9 Replies
09-24-2019, 04:32 AM
bgeneto

Theme © iAndrew 2016 - Forum software by © MyBB