Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2020-09-11 (6 days ago) ![]() | Not yet rated by the users | Total: 43 This week: 43 | All time: 9,916 This week: 5![]() |
Version | License | PHP version | Categories | |||
mezon-crud-service 1.0.0 | MIT/X Consortium ... | 5 | PHP 5, Databases, Web services, Desig... |
Description | Author | |
This package can generate Web service that performs CRUD operations. |
Just print in console
composer require mezon/crud-service
And that's all )
Now we are ready to create out first CRUD service. Here it is:
/
* Service class
*/
class TodoService extends \Mezon\CrudService\CrudService
{
/
* Constructor
*/
public function __construct()
{
parent::__construct([
'fields' => [
'id' => [
'type' => 'integer'
],
'title' => [
'type' => 'string'
]
],
'table-name' => 'records',
'entity-name' => 'record'
]);
}
}
$service = new TodoService();
$service->run();
The main part of this listing is:
parent::__construct([
'fields' => [
'id' => [
'type' => 'integer'
],
'title' => [
'type' => 'string'
]
],
'table-name' => 'records',
'entity-name' => 'record'
]);
Here we describe a list of fields of our entity, table name where it is stored and entity name.
Out of the box a list of CRUD endpoints are available:
GET /list/
GET /all/
GET /exact/list/[il:ids]/
GET /exact/[i:id]/
GET /fields/
POST|PUT /delete/[i:id]/
POST|DELETE /delete/
POST|PUT /create/
POST /update/[i:id]/
GET /new/from/[s:date]/
GET /records/count/
GET /last/[i:count]/
GET /records/count/[s:field]
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation |
![]() |
/ | Tests |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source |
![]() |
/ | Tests | / | conf |
File | Role | Description |
---|---|---|
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() | mezon-crud-service-2020-09-11.zip 23KB |
![]() | mezon-crud-service-2020-09-11.tar.gz 18KB |
![]() | Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.