Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: RESTful API Support
Post: RE: RESTful API Support

akinuri Wrote: (05-21-2021, 09:42 AM) -- The problem is with the validation. There doesn't seem to be a way/method to set the data manually. There's the withRequest() method, but I don't understand h...
7,935 Views
10 Replies
05-21-2021, 10:19 PM
bivanbi
    Thread: what is ?[0;32m and ?[0m in php spark
Post: RE: what is ?[0;32m and ?[0m in php spark

I suppose those would be color-codes (probably malformed) that your terminal fails to recognize and shows them literally. An example from the standard Ubuntu Linux .bashrc: if [ "$color_prompt"...
3,211 Views
5 Replies
05-10-2021, 10:34 PM
bivanbi
    Thread: REST API one-to-many resource relationships
Post: RE: REST API one-to-many resource relationships

I hope I understood your question correctly. As far as I am concerned, CI does not inherently support one-to-many relation between relational database rows in its DB / entity logic. I myself solved t...
5,921 Views
5 Replies
01-19-2021, 11:41 PM
bivanbi
    Thread: Thoughts on sending data to library from view
Post: RE: Thoughts on sending data to library from view

How about dependency inversion and make services that views can access? In my opinion, deciding how to present content is what View in MVC pattern responsible for, and themes belong to the presenta...
3,257 Views
5 Replies
12-17-2020, 04:08 AM
bivanbi
    Thread: Thoughts on sending data to library from view
Post: RE: Thoughts on sending data to library from view

Since you can call view from within a view, you can make the decision what other ('sub') views to load there. Example: Views/users/list.php PHP Code: -- --
3,257 Views
5 Replies
12-17-2020, 12:05 AM
bivanbi
    Thread: Report page with multiple Parts/Sections
Post: RE: Report page with multiple Parts/Sections

Reading your questions all over again, there is another layer to it I did not address. So CI is a 'low-level' framework. Much like LEGO. It will provide you with basic building blocks like database...
3,821 Views
6 Replies
10-25-2020, 11:46 PM
bivanbi
    Thread: Report page with multiple Parts/Sections
Post: RE: Report page with multiple Parts/Sections

Hi, it is definitely doable. But to make it up to par with today's modern single page web applications / expected user experience, you will need something to make your form react to user input. Thi...
3,821 Views
6 Replies
10-24-2020, 03:58 AM
bivanbi
    Thread: Parallel execution of helper function
Post: RE: Parallel execution of helper function

Depending on the hosting environment, there might be enforced time limits beyond your control, for instance, if there is a web application firewall / proxy between the browser and the PHP script. If t...
3,211 Views
4 Replies
08-31-2020, 11:28 PM
bivanbi
    Thread: Parallel execution of helper function
Post: RE: Parallel execution of helper function

By your description, I assume your cron job call the helper functions over HTTP. I do not know if your environment permits to call your CI instance directly via CLI, but if so, I recommend you to d...
3,211 Views
4 Replies
08-31-2020, 06:20 AM
bivanbi
    Thread: Testing: Database refresh and migrations
Post: RE: Testing: Database refresh and migrations

MGatner Wrote: (07-03-2020, 03:30 PM) -- That’s exactly the case I’m talking about. Since you don’t wipe the database between tests, let me ask: how are you setting up the database initially? -- I ...
5,045 Views
8 Replies
07-04-2020, 03:37 AM
bivanbi
    Thread: Detecting Model->delete() query result - how to detect error?
Post: RE: Detecting Model->delete() query result - how t...

The above example is wrong, it will not detect a failed query. The easiest way to reproduce a failed query is, for instance, a foreign key constraint on the table you are trying to delete from. ...
8,191 Views
8 Replies
07-03-2020, 11:20 PM
bivanbi
    Thread: Testing: Database refresh and migrations
Post: RE: Testing: Database refresh and migrations

Though on a much smaller scale, I encountered this kind of problem - database queries slow down tests quite noticeable. So I do something similar, try to do tests sequentially - without wiping DB - wh...
5,045 Views
8 Replies
07-03-2020, 03:27 PM
bivanbi
    Thread: Detecting Model->delete() query result - how to detect error?
Post: Detecting Model->delete() query result - how to de...

The documentation is very sparse (= non-existent) on Model->delete() method error handling. I found out the hard way that when I do not use soft delete and the actual query fails – with, for instance,...
8,191 Views
8 Replies
06-30-2020, 10:19 PM
bivanbi
    Thread: DB Using CodeIgniter’s Model - $afterFind
Post: RE: DB Using CodeIgniter’s Model - $afterFind

midav Wrote: (06-18-2020, 11:45 PM) -- I only need reading, and I thought you can do it all through $afterFind as I understand it, I need to write my processing function and call it so protected $...
4,923 Views
5 Replies
06-19-2020, 02:00 AM
bivanbi
    Thread: DB Using CodeIgniter’s Model - $afterFind
Post: RE: DB Using CodeIgniter’s Model - $afterFind

There are two approaches I use for multi-table operation, depending on what I want to achieve. 1) Database Views or JOIN statements: for read-only operation to get flat data (rows) with a single sel...
4,923 Views
5 Replies
06-18-2020, 10:07 PM
bivanbi
    Thread: Any tutorial site like laracast
Post: RE: Any tutorial site like laracast

I have not yet crossed any, but the idea is great. A walk-through-guide with examples would be handy. While I think the documentation is pretty good, I agree that it can be challenging, especially wh...
6,092 Views
7 Replies
06-07-2020, 12:44 PM
bivanbi
    Thread: Not sure to migrate to CI4
Post: RE: Not sure to migrate to CI4

I found throwing a generic exception made my life harder in the long run. I definitely want to differentiate, for instance, a real generic error like backend DB unreachable vs. user is not logged in /...
11,894 Views
15 Replies
05-18-2020, 05:19 AM
bivanbi
    Thread: Not sure to migrate to CI4
Post: RE: Not sure to migrate to CI4

I understand your struggle. When I first switched to CI4, I thought it would be a matter of few touch-ups and my application would work right away. Wrong. But throughout upgrading - or better put, re...
11,894 Views
15 Replies
05-12-2020, 09:21 PM
bivanbi
    Thread: Config/Migrations: default enabled/disabled confusion
Post: RE: Config/Migrations: default enabled/disabled co...

Thanks for the clarification! So in the end, it should be kept disabled most of the time, except when actually doing DB migrations.
2,884 Views
4 Replies
04-10-2020, 07:33 AM
bivanbi
    Thread: Config/Migrations: default enabled/disabled confusion
Post: Config/Migrations: default enabled/disabled confus...

Good day, I am doing an upgrade from 4.0.0-alpha2  to 4.0.2, and I am honestly confused here: app/Config/Migrations.php:  4.0.0-alpha2: Code: --     /*     |-----------------------------------...
2,884 Views
4 Replies
04-09-2020, 10:12 PM
bivanbi

Theme © iAndrew 2016 - Forum software by © MyBB