Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Help events
Post: RE: Help events

You can always use Filters to control which routes/controllers your class is run on. https://codeigniter.com/user_guide/incoming/filters.html
414 Views
1 Replies
12-08-2022, 04:30 PM
plaztic
    Thread: Urgent: Pass data from filters to controllers
Post: RE: Urgent: Pass data from filters to controllers

Create a Constant.
957 Views
3 Replies
10-16-2022, 09:59 AM
plaztic
    Thread: groupBy() undefined in Model.php
Post: RE: groupBy() undefined in Model.php

phpstan errors can be tricky to diagnose with the code you provided. Can you provide additional context as to how and where you are calling this method. Also, it would be best to include your entire m...
1,649 Views
2 Replies
08-17-2022, 01:13 PM
plaztic
    Thread: CodeIgniter 4.2
Post: RE: CodeIgniter 4.2

seighth Wrote: (06-04-2022, 05:01 AM) -- I built my site around the idea of easily finding the controller method just by looking at the url. Now it is all thrown out the window and I have to route li...
16,587 Views
18 Replies
07-06-2022, 12:26 PM
plaztic
    Thread: CodeIgniter4 Attribute Routes
Post: RE: CodeIgniter4 Attribute Routes

Huge thank you kenjis This should be baked into CI, or made available as an officially supported package in the next major release of CI.
8,829 Views
12 Replies
07-05-2022, 10:43 AM
plaztic
    Thread: Categories listing menu in footer
Post: RE: Categories listing menu in footer

You could do this several ways. I'd suggest creating a filter that is run before your controller(s). In your filter, you'd pull from the db the blog categories. You can then define a constant with ...
629 Views
1 Replies
05-10-2022, 10:53 AM
plaztic
    Thread: Count model result
Post: RE: Count model result

You can create a helper function to simplify things: PHP Code: -- if (!function_exists('numRows')) {   /**     * Accepts database result object and returns number of rows found.     *     * @...
3,566 Views
8 Replies
02-10-2022, 11:35 AM
plaztic
    Thread: Controller with index($id) method with parameter
Post: RE: Controller with index($id) method with paramet...

PHP Code: --   public function _remap()     {         return $this->index();     } --
1,836 Views
4 Replies
08-25-2021, 10:52 AM
plaztic
    Thread: debug bar always visible, no matter if dev or prod environment
Post: RE: debug bar always visible, no matter if dev or ...

If the 'normal' method is not working, you can try commenting out 'toolbar' from the code below in /Config/Filters.php PHP Code: -- public $globals = [         'before' => [             // 'hone...
1,416 Views
2 Replies
02-19-2021, 11:25 AM
plaztic
    Thread: Migrating CI3 to CI4, need query->numRows function
Post: RE: Migrating CI3 to CI4, need query->numRows func...

You can create a helper for ease of use: Code: -- if (!function_exists('numRows')) {     /**      * Accepts database result object and returns number of rows found.      * CI 4 does not have C...
7,164 Views
11 Replies
01-25-2021, 10:47 AM
plaztic
    Thread: Supported Languages
Post: RE: Supported Languages

PHP Code: -- $config = new \Config\Language(); $array = $config->languages; --
2,092 Views
2 Replies
01-25-2020, 11:59 AM
plaztic
    Thread: Url segment in ci4
Post: RE: Url segment in ci4

You can make your own helper function to return segment value. PHP Code: -- if (!function_exists('getSegment')) {     /**      * Returns segment value for given segment number or false.      *     ...
22,477 Views
7 Replies
01-25-2020, 11:55 AM
plaztic

Theme © iAndrew 2016 - Forum software by © MyBB