Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: CodeIgniter 4 Modules -How I am doing it [Recommendations Required]
Post: CodeIgniter 4 Modules -How I am doing it [Recommen...

;Hello there. I have been using CodeIgniter 4 since its release. But of late I have started to dislike the idea of defining module routes in the main Config/Routes.php file. I came up with a hack, m...
2,300 Views
2 Replies
10-01-2020, 01:32 AM
Bennito254
    Thread: Multiple instances of CI4 and removal of public/index.php/ from url
Post: RE: Multiple instances of CI4 and removal of publi...

Yes, you can remove the public/ directory completely, but this will introduce security issues since all of the CodeIgniter files will be accessible from the web. You can read on how you can set up mu...
4,764 Views
5 Replies
03-19-2020, 11:31 AM
Bennito254
    Thread: Controller filter does not work in the default controller
Post: RE: Controller filter does not work in the default...

Hello, I had the same problem. `user/*` means the filter to be applied on any other URIs after user/. To include `user`, do the following: `public $filters = [ 'isLoggedIn' => ['before...
1,445 Views
1 Replies
03-19-2020, 11:19 AM
Bennito254
    Thread: CodeIgniter v4.0.2: Current class and method names
Post: RE: CodeIgniter v4.0.2: Current class and method n...

MGatner Wrote: (03-13-2020, 10:54 AM) -- You want the Router class, and the following methods: contrrollerName(), methodName() You can get it directly from the service as well: $controller = service...
5,863 Views
5 Replies
03-13-2020, 11:02 AM
Bennito254
    Thread: CodeIgniter v4.0.2: Current class and method names
Post: RE: CodeIgniter v4.0.2: Current class and method n...

Found a solution: Can be used in helpers too. PHP Code: --     $router = \Config\Services::router();     $_method = $router->methodName();     $_controller = $router->controllerName(); --
5,863 Views
5 Replies
03-13-2020, 09:20 AM
Bennito254
    Thread: CodeIgniter v4.0.2: Current class and method names
Post: RE: CodeIgniter v4.0.2: Current class and method n...

What about from a helper, or a library.
5,863 Views
5 Replies
03-13-2020, 08:36 AM
Bennito254
    Thread: CodeIgniter v4.0.2: Current class and method names
Post: CodeIgniter v4.0.2: Current class and method names

How can I fetch the names of the currently displayed controller class and the method?
5,863 Views
5 Replies
03-13-2020, 05:41 AM
Bennito254
    Thread: SOLVED: CI 4.0.2 and subdirectories
Post: RE: CI 4.0.2 and subdirectories

I am facing the same problem for the Controllers and the Views too
6,737 Views
6 Replies
03-13-2020, 05:39 AM
Bennito254

Theme © iAndrew 2016 - Forum software by © MyBB