Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Catch database exception
Post: RE: Catch database exception

But what is a sens to log an error if we have enabled database throws for debug mode? In this situation, every time an error is logged even if we catch it manually and do something.
5,804 Views
6 Replies
11-30-2020, 03:19 PM
Michal_PB1
    Thread: Catch database exception
Post: RE: Catch database exception

I found in system/Database/MySQLi/Connection.php:329 this code: PHP Code: -- try { return $this->connID->query($this->prepQuery($sql)); } catch (\mysqli_sql_exception $e) { l...
5,804 Views
6 Replies
11-30-2020, 01:13 PM
Michal_PB1
    Thread: Catch database exception
Post: RE: Catch database exception

Unfortunately, what you propose doesn't help :/ EDIT: I cannot use `exit($e->getMessage());` because the executed code is stopped
5,804 Views
6 Replies
10-14-2020, 07:25 AM
Michal_PB1
  Question Thread: Catch database exception
Post: Catch database exception

Hi, I have some problems with catching a database exception. On the development, everything works as I expected but not on the production. My code looks like below: PHP Code: --         try ...
5,804 Views
6 Replies
10-13-2020, 11:44 AM
Michal_PB1
  Lightbulb Thread: Global query params for CURL
Post: Global query params for CURL

Hi, In reference to https://forum.codeigniter.com/thread-77391.html. I think that adding an option to sets a global query for CURLRequest would be useful. It may be used for a request authorization...
1,323 Views
0 Replies
08-31-2020, 06:18 AM
Michal_PB1
    Thread: CURL and clearing query after send
Post: RE: CURL and clearing query after send

I think if someone sets a new `query` option then previously added query should be overridden. The second resolution of that problem could be a new property for setting a global `query` for the client...
2,309 Views
3 Replies
08-27-2020, 05:08 AM
Michal_PB1
  Question Thread: CURL and clearing query after send
Post: CURL and clearing query after send

Hi, I'm using `curlrequest` but I found a problem. When we use a service `curlrequest` we could set an option for the client. For API which I'm trying to call auth is passed as a query params so I ...
2,309 Views
3 Replies
08-25-2020, 02:20 PM
Michal_PB1
  Question Thread: Toolbar and performence information
Post: Toolbar and performence information

Hi, Maybe someone knows if there is a way to more accurately check the performance of individual elements/methods? As you can see in the photo below 'Controller' takes about 3.5s, but without m...
1,355 Views
1 Replies
07-05-2020, 12:11 PM
Michal_PB1
  Lightbulb Thread: Configurable path for .env file
Post: Configurable path for .env file

Hi, I have a reorganized structure for the application and currently, I can run several domains for one application. I would need to change the location of the .env file (finally the file for each d...
2,554 Views
1 Replies
06-14-2020, 11:43 AM
Michal_PB1
  Question Thread: Repository pattern
Post: Repository pattern

Hey, Can anyone have an example of the correct use of a repository pattern with Codeigniter 4? Thx :)
1,148 Views
0 Replies
04-29-2020, 10:24 AM
Michal_PB1
    Thread: database table backup and duplicate
Post: RE: database table backup and duplicate

@paul I have created a command for that. I decide to use this package (https://github.com/spatie/db-dumper). Maybe it will be helpful for you: PHP Code: --
3,622 Views
2 Replies
04-24-2020, 10:20 AM
Michal_PB1
  Question Thread: Optional param in routing
Post: Optional param in routing

Hi, Is it possible to mark a parameter for routing as optional? [hr] Ok, I created the routes with different parameters and that works as I expected $routes->get('add/(:any)/(:any)', 'CartContro...
820 Views
0 Replies
04-09-2020, 11:15 AM
Michal_PB1
    Thread: Load routes from file
Post: RE: Load routes from file

Thx. Great, that makes sense FoLez Wrote: (04-02-2020, 02:26 PM) -- And if you use this code in the Config/Routes.php file Add its to 14 line PHP Code: -- $request = new Request(new \Config\App);...
3,012 Views
4 Replies
04-03-2020, 03:13 AM
Michal_PB1
    Thread: Load routes from file
Post: RE: Load routes from file

I know and I have it now. I understand that will be discovered and loaded automatically. I have one module responsible for the frontend and backend part and all necessary routes currently I have in...
3,012 Views
4 Replies
04-02-2020, 09:06 AM
Michal_PB1
  Question Thread: Load routes from file
Post: Load routes from file

Hi, Is it possible to load routes from a specific file? For instance, I have: Module     - Config         - BackedRoutes.php         - FrontRoutes.php     (...) or something like that ...
3,012 Views
4 Replies
04-02-2020, 07:16 AM
Michal_PB1
  Question Thread: Routes and (:hash)
Post: Routes and (:hash)

Hi, In the doc I found something like that (:hash) for routing placeholder - here (https://codeigniter4.github.io/userguide/incoming/routing.html?highlight=(:hash)) but I don't know how I shou...
1,750 Views
1 Replies
03-19-2020, 09:44 AM
Michal_PB1
    Thread: Dynamic image generation
Post: RE: Dynamic image generation

I not sure but maybe problem is that the dot is interpreted as any character in regex
4,233 Views
6 Replies
01-16-2020, 09:54 AM
Michal_PB1
    Thread: Dynamic image generation
Post: RE: Dynamic image generation

I tried a few combinations with that route and noone pattern not working. Every time it looks for a default router 404 - File Not Found Can't find a route for '/'.
4,233 Views
6 Replies
01-16-2020, 09:42 AM
Michal_PB1
    Thread: Dynamic image generation
Post: RE: Dynamic image generation

Dedov_Evgeniy Wrote: (01-16-2020, 12:43 AM) -- Michal_PB1 Wrote: (01-15-2020, 02:28 PM) -- Hi, I would like to generate dynamically image sizes so I create a routing for that (/image/generate/400-4...
4,233 Views
6 Replies
01-16-2020, 09:30 AM
Michal_PB1
  Question Thread: Dynamic image generation
Post: Dynamic image generation

Hi, I would like to generate dynamically image sizes so I create a routing for that (/image/generate/400-400/test.jpg) PHP Code: -- $routes->get('/image/generate/(:any)/(:any)', 'Home::image/$1...
4,233 Views
6 Replies
01-15-2020, 02:28 PM
Michal_PB1

Theme © iAndrew 2016 - Forum software by © MyBB