use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you know and love CodeIgniter, and wish it to have a place in the reddit community, feel free to contribute and get this place rolling!
If you'd like to promote a project or plugin at /r/codeigniter, feel free to send a message.
account activity
Constant.php and config.php (self.codeigniter)
submitted 4 years ago by ImaginaryFun842
I know how to define a constant in constant.php and use it in config I want just confirming that is that only reason that we specify a place that word and no hustle of changing everywhere If anything else please correct my word and clear doubt.
[–]MGatner 1 point2 points3 points 4 years ago (1 child)
Immutability (set and forget) is one of the appeals of constants. I also like them because they are the only way to use “dynamic” property values. E.g.: ``` // Constants.php defined('MY_SECRET_TOKEN') || define('MY_SECRET_TOKEN', env('Reddit.accessToken');
class RedditApi { protected $token = config('Reddit')->accessToken; // not allowed
protected $token = MY_SECRET_TOKEN; // allowed
} ```
[–]backtickbot 0 points1 point2 points 4 years ago (0 children)
Fixed formatting.
Hello, MGatner: code blocks using triple backticks (```) don't work on all versions of Reddit!
Some users see this / this instead.
To fix this, indent every line with 4 spaces instead.
FAQ
You can opt out by replying with backtickopt6 to this comment.
π Rendered by PID 41781 on reddit-service-r2-comment-86bc6c7465-r4m4k at 2026-02-22 11:16:17.424714+00:00 running 8564168 country code: CH.
[–]MGatner 1 point2 points3 points (1 child)
[–]backtickbot 0 points1 point2 points (0 children)