Download the PHP package lydic-group/rapid-api-crud without Composer

On this page you can find all versions of the php package lydic-group/rapid-api-crud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rapid-api-crud

LYDIC group / Rapid API CRUD Bundle

This software enables rapid and flexible Symfony API CRUD development.

What it does

Endpoints

When you extend the RapidApiCrudController, these endpoints will become accessible automagically:

Action HTTP Method Example URL HTTP Response code HTTP Response body
Create an entity POST /users 201 Created entity
List all entities (*) GET /users 200 Array of entities
Find one entity GET /users/1 200 Entity
Update an entity PUT /users/1 200 Updated entity
Delete an entity DELETE /users/1 204 -
Find association (**) GET /users/1/best-friends 200 ToOne: A single associated entity
ToMany: An array of associated entities
Create association (**) POST /users/1/best-friends/2 201 Entity
Delete association (**) DELETE /users/1/best-friends/2 204 -

(*) These endpoints accepts some query parameters.

(**) These endpoints work for ToOne and ToMany associations. best-friends is the name of the association on the User model: $bestFriends.

Filtering

There are several implementations for filtering. You can change the filter mode using the ControllerConfig.

Filter Example
Basic /users?name=Steve
Extended /users?filter=name:eq:Steve OR age:gt:21
DQL (Doctrine Query Language) /users?filter=entity.name = 'Steve'

Sorting

You can also add sorting to your result: /users?sort=age ASC

Pagination

You can also add paging queries: /users?page=1&limit=10

Associated entities

Associated entities are normalized to their ID by default for performance reasons.
If you want to include the entire entity you can use a query param with (comma separated) association names. For example:
On the list endpoint: /users?include=bestFriends
On the detail endpoint: /users/1?include=bestFriends
On an assocation endpoint: /users/1/best-friends?include=car
This will only go 1 deep.

How to use

The fast/flexible way

  1. Create an entity and implement the RapidApiCrudEntity (optionally use Symfony validation annotations)
  2. Create a controller that extends the RapidApiCrudController
  3. Implement the required method(s) and use the config DTO to enable/disable certain routes

The fully customizable way

  1. Create or edit an existing model and implement the RapidApiCrudEntity interface
  2. Create or edit an existing controller and don't extend the RapidApiCrudController
  3. Inject the CrudService
  4. Create the desired methods/routes and use the logic from CrudService to be up and running super fast

Feel free to use the ControllerFacade for specific route functionality. If you need even more specific logic, use the CrudService.

Roadmap

Take a look at our kanban board here

Support

Hey 👋 If you like our libraries. Support us by buying us a coffee!


All versions of rapid-api-crud with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
symfony/serializer Version ^5.2
symfony/property-access Version ^5.2
symfony/http-foundation Version ^5.2
symfony/validator Version ^5.2
doctrine/orm Version ^2.8
symfony/framework-bundle Version ^5.2
symfony/messenger Version ^5.2
symfony/routing Version ^5.2
symfony/http-kernel Version ^5.2
lydic-group/filtering Version ^0.1.0
symfony/string Version ^5.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lydic-group/rapid-api-crud contains the following files

Loading the files please wait ....