Skip to content

mludovico/location-based-supermarket-product-crud-simple-PHP

Repository files navigation

Location based Supermarket CRUD

This is the simplest example of the use of Laravel to implement a registration, edition and removal system of supermarket products organised by location.

Database integration

The database used is mySql. A single able was used to store products and locations with these properties:

  • id
  • name
  • location
  • timestamps (automatically generated by Laravel)

Models

There is a single model: - Product That holds its objects properties.

Views

There is a single screens:

  • index from where is possible to make all operations over the system.

Controllers

There is a single controller: - ProductController that provides methods for CRUDing items Here is an extra method to get json data for AJAX calls

Routes

The Controller's methods are accessible through its own route - /products and HTTP methods:

  • GET
  • POST
  • DELETE

Polling

An ajax function is called every 2 seconds to retrieve new items from the database.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published