Download the PHP package sawarame/php-json-server without Composer

On this page you can find all versions of the php package sawarame/php-json-server. 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 php-json-server

php-json-sever

Build Status Version

php-json-server is RESTful API with PHP. The data can be wrote json format, and you can easily set up RESTful API mock server.

Installation and Startup

Use Composer for installation and server start-up.

Once installed, You can startup php-json-server with PHP build-in server.

Then visit the site at http://localhost:8080/. If the welcome page is displayed, installation and startup are successful.

Prepare data

Save data file in the path below.

The schema_name of file name is used to data name. The data name can be any name, and multiple datas can be saved under different name. There is a sample.json in the initial state.

Data must wrote by array of json format. Data structure is arbitrary, but id column is required.

Read data

To get the data named schema_name, access below URL with GET method.

Default data rows per page is 20. if you want to change it, use rows parameter.

How to change page is use page parameter.

You can search by using the column name as the parameter.

Normally, When multiple parameters are specified, the search will be an AND condition. If you want to search with OR condition, use or to search_type parameter.

Response header

The response header contains information about paging.

name description
PJS-Total: Total number of datas.
PJS-pages: Total number of pages.
PJS-Rows: Rows of current page.

Find row

Example below receive the data that id column value is 123.

Insert row

Use POST method for insert data.

Created data will be returned.

Update row

Use PUT method for update data.

Updated data will be returned.

Delete row

Use DELETE method for delete data.

Deleted data will be returned.


All versions of php-json-server with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
laminas/laminas-component-installer Version ^2.4
laminas/laminas-development-mode Version ^3.2
laminas/laminas-mvc Version ^3.1.1
components/jquery Version ^3.4
components/bootstrap Version ^4.4
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 sawarame/php-json-server contains the following files

Loading the files please wait ....