Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: How can I remove a unique constraint on a field when performing a down migration?
Post: How can I remove a unique constraint on a field wh...
Copy-pasted from https://stackoverflow.com/questions/6503...-migration, feel free to answer the question there too to win a few points.
I have to add a unique constraint to a field after the table wa... |
|
SteeveDroz |
CodeIgniter 4 Support
|
2 |
386 |
12-02-2020, 02:48 AM |
|
|
Thread: Can someone check base_url() and base_url("param")
Post: RE: Can someone check base_url() and base_url("par...
Oh yeah… I looked at the code and saw it was using relative URIs. I must have misread a line, sorry about my false answer.
I don't intend to try to correct your way of doing, you seem way more expert... |
|
SteeveDroz |
CodeIgniter 4 Support
|
7 |
631 |
09-07-2020, 03:42 AM |
|
|
Thread: Can someone check base_url() and base_url("param")
Post: RE: Can someone check base_url() and base_url("par...
Ah, I see!
Your problem comes from the fact that base_url($param) uses relative URIs. That means that it will display a page according to your current location.
To avoid that, you can prefix you... |
|
SteeveDroz |
CodeIgniter 4 Support
|
7 |
631 |
09-07-2020, 02:17 AM |
|
|
Thread: Can someone check base_url() and base_url("param")
Post: RE: Can someone check base_url() and base_url("par...
Hi, I'd need 3 more informations to answer that question:
1. Where did you write that code (in which controller/model/view/library/…)?
2. What is the incorrect result you get?
3. What is the expected... |
|
SteeveDroz |
CodeIgniter 4 Support
|
7 |
631 |
09-06-2020, 10:24 PM |
|
|
Thread: Unable to connect to database - cannot find error messages
Post: RE: Unable to connect to database - cannot find er...
Hard to say, do you have a ".env" file at the root of your project? Its content overrides your config files.
Actually, you SHOULD use that ".env" file instead of writing directly to app/Config/Databa... |
|
SteeveDroz |
CodeIgniter 4 Support
|
7 |
5,860 |
09-06-2020, 10:04 PM |
|
|
Thread: Testing current URI
Post: Testing current URI
Hello,
As stated in this StackOverflow question, to which you can answer and win a few points, I am trying to run a unit test of a library that checks the value of string_uri().
In order to test it ... |
|
SteeveDroz |
CodeIgniter 4 Support
|
0 |
245 |
09-06-2020, 09:53 PM |
|
|
Thread: redirect() does not redirects
Post: RE: redirect() does not redirects
Haha, I just answered a question from you on StackOverflow and here we meet again (I promise I'm not following you).
Have you tried using Filters? https://codeigniter4.github.io/userguide...lters.htm... |
|
SteeveDroz |
CodeIgniter 4 Support
|
4 |
654 |
09-06-2020, 09:48 PM |
|
|
Thread: Recognize child locale as parent locale
Post: RE: Recognize child locale as parent locale
Thanks for your answer. It seems to be quite a lot of work for something that doesn't appear to be an edge case: browser usually aren't configures to ask for generic languages first.
I'm not sure wha... |
|
SteeveDroz |
CodeIgniter 4 Support
|
5 |
1,389 |
01-30-2020, 11:03 PM |
|
|
Thread: Recognize child locale as parent locale
Post: RE: Recognize child locale as parent locale
(01-30-2020, 05:43 AM)InsiteFX Wrote: Read: CodeIgniter User Guide - Configuring the Locale
I usually don't mind minimal answers, but this one doesn't help.
I do understand that it's better to use ... |
|
SteeveDroz |
CodeIgniter 4 Support
|
5 |
1,389 |
01-30-2020, 09:14 AM |
|
|
Thread: Recognize child locale as parent locale
Post: Recognize child locale as parent locale
Hello everyone,
Most locales have children locales. For example, "en" has "en_UK", "en_US", "en_AU", "en_CA", and so on. (FYI, "en" has 105 children locales!)
My browser is configured to look for "f... |
|
SteeveDroz |
CodeIgniter 4 Support
|
5 |
1,389 |
01-29-2020, 10:56 PM |
|
|
Thread: How can I use a helper in a unit test?
Post: RE: How can I use a helper in a unit test?
I'm a bit ashamed it was that simple. I loaded the helper in my BaseController, I should have done the same in my test case!
Thanks for the answer! |
|
SteeveDroz |
CodeIgniter 4 Support
|
2 |
1,088 |
12-07-2019, 01:08 AM |
|
|
Thread: How can I use a helper in a unit test?
Post: How can I use a helper in a unit test?
Hi there!
Here is my problem:
I try to create a test case that extends CIDatabaseTestCase.
In this one, I use a model of mine to access the database.
In that model, I use the helper function "char... |
|
SteeveDroz |
CodeIgniter 4 Support
|
2 |
1,088 |
12-06-2019, 12:15 AM |
|
|
Thread: Testing with session
Post: RE: Testing with session
(10-28-2019, 06:34 AM)kilishan Wrote: CodeIgniter ships with a MockSession class you can use. For an example of using it, check out my Myth:Auth package.
OK, it seems undocumented, but now I know it... |
|
SteeveDroz |
CodeIgniter 4 Support
|
5 |
1,706 |
10-30-2019, 12:06 PM |
|
|
Thread: Testing with session
Post: RE: Testing with session
Just to be clear: I'm not a newbie with basic questions (I actually teach PHP and answer those basic questions all day long).
So first, your code should be:
PHP Code:if (!isset($_SESSION)){... |
|
SteeveDroz |
CodeIgniter 4 Support
|
5 |
1,706 |
10-27-2019, 10:31 PM |
|
|
Thread: Testing with session
Post: Testing with session
Hello,
I'm trying to test an "Auth" library I created. Obviously, that library uses the session.
My first test looks like this:
PHP Code:public function testConstructor(){ ... |
|
SteeveDroz |
CodeIgniter 4 Support
|
5 |
1,706 |
10-27-2019, 12:05 AM |
|
|
Thread: Redirection in a helper
Post: RE: Redirection in a helper
YES!!! A thousand times yes! This est exactly and precisely what I needed. Thanks a lot. |
|
SteeveDroz |
CodeIgniter 4 Support
|
5 |
2,064 |
10-14-2019, 10:28 PM |
|
|
Thread: Redirection in a helper
Post: RE: Redirection in a helper
OK, so I'm not calling a helper, I'm calling $this->redirectIfNotLoggedIn() inherited from the BaseController.
Here is my new code:
PHP Code:// in BaseController:protected funct... |
|
SteeveDroz |
CodeIgniter 4 Support
|
5 |
2,064 |
10-13-2019, 09:54 PM |
|
|
Thread: Redirection in a helper
Post: Redirection in a helper
Hello there,
With ci3, I usually created a helper with a function called "redirect_if_not_logged_in()" that I called at the top of some controllers.
The goal of that function was quite self-explanat... |
|
SteeveDroz |
CodeIgniter 4 Support
|
5 |
2,064 |
10-12-2019, 11:50 PM |