php-crud-api
php-crud-api copied to clipboard
Single file PHP script that adds a REST API to a SQL database
Filtering data in back-end based on authenticated user's role set in MySQL DB
My latest project uses Firebase authentication for token issuing. The token doesn't contain any information regarding e.g. user's role or permissions. The MySQL database however contains a table 'Users' which...
Suggestion: Make (middleware) config case-agnostic
There's probably no particular reason that middleware and other config options are case-sensitive. I think it would be easier for inexperienced users, if this was made case-insensitive, as it might...
DbAuthMiddleware not working
my users table name: users config: tables' => 'product,manufacturer,category', blocking acces // Authorization 'authorization.tableHandler' => function ($operation, $tableName) { return $tableName != 'users'; }, and response {"code":9999,"message":"SQLSTATE[42000]: Syntax error or...
API for uploading files (of any type)
I want to share my custom controller to add the api to upload files of any type. you can use this API `http://localhost:8080/api.php/upload` with the POST method to send your...
Add function support in SELECT query: SELECT COUNT(*) AS C FROM ATABLE https://127.0.0.1/api.php/records/mytest/?include=count(*)%20AS%20c
Support for oracle database?
I am very happy to see such a good product, I want to know when your code can support the oracle database.
Add email verification and password reset to dbAuth
Hi, in the dbAuth middleware, do you think it would be possible to add the email verification and password reset process? Before a user is effectively registered, he must click...
Support foreign key that points to a non-primary (unique) key
I have a `questions` table and an `answers` table. the `answers` table has a foreignKey field named `questionUuid` related to the field `uuid` (not related to the id field) of...
MIDDLEWARE - dbAuth - PHPSESSID Cookie - SameSite Option
is there a way to set, in the PHPSESSID, the option SameSite to "none"? my devel db is on another machine and the browser defaults its value to SameSite="Lax", blocking...
Support for stored procedures
We could support stored procedures or similarly "soft" or "fake" stored procedures, which are really SQL files on disk that will be executed on an API endpoint.