Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

framework

Modified Silex to allow Controllers, Models and DAOs using an Autoloader.

For this example to actually run you'll need to set up a MySQL instance with:

DB Stuff

  1. Make a schema named 'test_schema'

  2. Make a table under 'test_schema' named automobiles

Cols:

  • id INT(11) PK, NN, AI
  • type VARCHAR(45)
  • number_of_wheels VARCHAR(45)
  • color VARCHAR(45)
  • make VARCHAR(45)
  • model VARCHAR(45)
  1. Make a table under 'test_schema' named users

Cols:

  • id INT(11) PK, NN, AI
  • first_name VARCHAR(45)
  • last_name VARCHAR(45)
  • dob VARCHAR(45)
  • phone_num VARCHAR(45)
  1. Populate both tables with some information

Code Stuff

  1. Pull down code somewhere PHP can run
  2. Run Composer
  3. Add correct configs info in configs/config.php for MySQL instance

Using POSTMAN or in a browser go to:

http://YOUR_URL/api/v2/test if working you should see a message telling you the API is working

If you get this running and would like to mess around with it. Try adding a 'get Automobile by model' and/or a 'create a new Automobile' endpoint

About

Modified Silex to allow Controllers, Models and DAOs using an Autoloader.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages