https://github.com/shabaz-ejaz/code-exercise-oop
https://github.com/shabaz-ejaz/code-exercise-oop
encryption laravel php
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/shabaz-ejaz/code-exercise-oop
- Owner: shabaz-ejaz
- Created: 2020-01-31T15:44:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-19T19:26:41.000Z (over 2 years ago)
- Last Synced: 2025-01-20T10:11:29.549Z (9 months ago)
- Topics: encryption, laravel, php
- Language: PHP
- Homepage:
- Size: 1.37 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.MD
Awesome Lists containing this project
README
# Code Exercise OOP
This project will consume an [API](https://www.itccompliance.co.uk/recruitment-webservice/api/) to fetch some products and display them on the screen.
## Installation
Simply run composer install and that should be enough to get going.
```bash
composer install
```## Usage
You'll see a table list of products on the homepage. Simply click view more to to view product details.
## Testing
Simply run the following command:
```bash
phpunit Tests/ApiTest.php
```## Comments
So I have used the Guzzle HTTP package to carry out my HTTP requests, I could have used Curl directly but Guzzle nicely abstracts away all the tedious details and it's more readable with less code.I created an API class which has a generic `apiCall` method that can take any type of request and it will return a response. The `ProductInventory` class is basically the main class which has the getter methods for the products. I didn't know what else to call it :/
The `register.php` file is basically registering everything, sort of similar to Laravel's bootstrap file and similar to a Java main class.