PHP Classes

How to Use a PHP REST API Library to Implement an API that Uses the MVC Design Pattern Using the Package Web Service PHP MySQL: Implement an API using MySQL to store objects

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-11-20 (12 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
webservicephpmysql 1.0The PHP License5PHP 5, Web services, Design Patterns
Description 

Author

This package can implement an API using MySQL to store objects.

It provides a router class that can register URL patterns associated with controller classes.

The package can process the current request to check if the request URL matches any of the URL patterns, call the associated controller class to process the request, and generate the API call response.

Picture of António Lira Fernandes
Name: António Lira Fernandes <contact>
Classes: 12 packages by
Country: Portugal Portugal
Innovation award
Innovation award
Nominee: 3x

Winner: 2x

 

Documentation

routes

The goal of this package is to implement a routing mechanism to present beautiful URLs. With this mechanism, all requests are made in the public folder and then redirected to a specific file according to the route (URL) written.

version

Version 1.0 2023/03/06

install

  1. Copy all files to the website root.
  2. Update .htaccess for the actual configuration. Change line 3 to set for the url to public folder.

edit the routes file to match a route to a file. Each route or set of routes should correspond to a website service. In order to edit the routes.php file to make the correspondence you need to open the file and add the desired route and the corresponding service. For example, if you want to match the route "/my-route" to the "my-service" service, you can add the following line to the routes.php file:

Route::get('/my-route', 'MyService@index'); This will make it so that when a request is sent to the "/my-route" URL, the "MyService" service is invoked. You can also use route parameters and wildcards to make more complex matches. For more information on the routing system in PHP, please refer to the official documentation.


  Files folder image Files (42)  
File Role Description
Files folder imageapp (4 files)
Files folder imageclasses (1 file, 1 directory)
Files folder imageimage (5 files)
Files folder imagejson (4 files)
Files folder imagepublic (2 files)
Files folder imageroutes (1 file)
Files folder imagesrc (7 files, 1 directory)
Files folder imagetemplates (2 directories)
Accessible without login Plain text file .htaccess Data Auxiliary data
Accessible without login Plain text file autoload.php Aux. Auxiliary script
Accessible without login Plain text file bootstrap.php Example Example script
Accessible without login Plain text file config.php Aux. Configuration script
Accessible without login Plain text file PHP - Sistema de Rotas.pdf Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0