Api service with slim 4

I found tutorial

Does slim support Action (all in one) , for example, all about user will be in one class.

Action
class User
– create user
– raed user
– update user
– delete user
?

Second question

How to create database transaction with two or more queries?

Hi @Mark

Does slim support Action (all in one) , for example, all about user will be in one class.

This will be supported in Slim 4.8. See here.

How to create database transaction with two or more queries?

Please add more details. What database abstraction layer are you using?

PDO provides the beginTransaction, commit and rollBack methods for handling transactions.

Can you add one example?

Mysql and Postgresql Pdo.
I need one example.

That’s why I added the 2 links. See above.

When will be slim 4.8 available for install over composer?

Do I need use your selective library?

I ask for example for transaction in slim.

When will be slim 4.8 available for install over composer?

I don’t know. Maybe @l0gicgate knows more?

Do I need use your selective library?

Not sure what library you mean. Please add more details to your question.

I ask for example for transaction in slim.

Slim is a micro-framework and has no built-in database / transaction component. So there is no Slim specific example. You can use PDO directly or any QueryBuilder or ORM.