⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Stop Adding to DB



Anwar Subhi

Anwar Subhi
  • profile picture
  • Member

Posted 18 June 2016 - 05:47 AM

Hello, 

 

I have a question.

 

Basically I had a project for which grocery crud ... was perfect ... meanwhile however a small requirement changed. 

 

When I add new information to the database instead of adding it normally as grocerycrud does ... I have to send it to an API.

 

So sending to an api .. no problem I can use: callback_before_insert, but how I can stop adding to database ? 

 

One of the idea I have it's that after adding in the db to delete it with callback_after_insert ..

 

Any advises or maybe better / safer way to do it ? 

 

Regards, 

Anwar