PHP Classes

PHP Products Recommendations: Get city weather and product recommendations

Recommend this page to a friend!
  Info   View files Documentation   View files View files (84)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2022-09-13 (17 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 27 This week: 8All time: 10,656 This week: 17Up
Version License PHP version Categories
recommendations 1.0.0The PHP License5PHP 5
Description Author

This package can get city weather and product recommendations.

It provides an API that clients may call and pass a given city's name as a parameter.

The package calls the Meteo API to get current weather conditions and recommended products sold in that city.

Innovation Award
PHP Programming Innovation award nominee
September 2022
Nominee
Vote
Many people like to do tourism travel to places that they don't know. When in those places, they want to buy products that probably only exist because of the weather and bring souvenirs.

This package provides an API that can return recommendations for products to buy in a given city the according to the current weather conditions.

These features help implement applications for the tourism market.

Manuel Lemos
Picture of Edward Paul
  Performance   Level  
Name: Edward Paul <contact>
Classes: 14 packages by
Country: Nigeria Nigeria
Innovation award
Innovation award
Nominee: 9x

Winner: 1x

Details

<p align="center">Returns product recommendations depending on current weather.</p> <p align="center"><a href="https://medium.com/@infinitypaul">Creator</a> | <a href="https://infinityadeo.herokuapp.com/api/v1/products/recommended/alanta">Demo URL</a></p>

Tech Stack

  • Laravel
  • Mysql
  • PHP

Download Instruction

  1. Clone the project.
git clone https://github.com/infinitypaul/recommendations.git projectname

  1. Install dependencies via composer.
composer install 

  1. Migrate and seed the Database.
php artisan migrate --seed

  1. Run php server.
php artisan serve

> You can also install the Application via Docker:

Pre-requisites

  • Docker running on the host machine.
  • Docker compose running on the host machine.
  1. Clone the project.
git clone https://github.com/infinitypaul/findyourservive.git projectname

  1. Run the testrig.sh file on the Project Root Folder on your terminal/Command Prompt, This script does everything you need to run your this project. It starts up the servers, ensures the database is booted, installs dependencies, runs database migrations, and runs database seeds. These services are exposed to your computer on the standard ports, then you can access your website on http:localhost

Troubleshooting

  • Port number might be already in use, change from `80` to another number in your `docker-compose.yml` file.
  • If you have any other issues, report them.

Api Usage

> Using Get Request:

GET http://localhost/api/v1/products/recommended/:CITY

  • http://localhost/ is your Base Url, You Can Replace it with yours
  • CITY are the cities name in Lithuania eg: akuotai, You can get the available cities here https://api.meteo.lt/v1/places

And Viola, Right In Front Of You Will Be The City Name, The Current Weather Condition Of The City And List Of Recommended Products You Can Buy From, Make Sure You Buy One.

Enjoy!!

  Files folder image Files  
File Role Description
Files folder image.scripts (1 file)
Files folder imageapp (2 files, 5 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (14 files)
Files folder imagedatabase (3 directories)
Files folder imagepublic (4 files)
Files folder imageresources (4 directories)
Files folder imageroutes (4 files)
Files folder imagetests (2 files, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Plain text file .phpstorm.meta.php Class Class source
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Plain text file artisan Class Class source
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file docker-compose.yml Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file Procfile Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file server.php Aux. Auxiliary script
Accessible without login Plain text file testrig.sh Data Auxiliary data
Accessible without login Plain text file webpack.mix.js Data Auxiliary data
Plain text file _ide_helper.php Class Class source

  Files folder image Files  /  .scripts  
File Role Description
  Accessible without login Plain text file composer.sh Data Auxiliary data

  Files folder image Files  /  app  
File Role Description
Files folder imageConsole (1 file)
Files folder imageExceptions (1 file)
Files folder imageHttp (1 file, 3 directories)
Files folder imageProviders (5 files)
Files folder imageServices (2 files)
  Plain text file Product.php Class Class source
  Plain text file User.php Class Class source

  Files folder image Files  /  app  /  Console  
File Role Description
  Plain text file Kernel.php Class Class source

  Files folder image Files  /  app  /  Exceptions  
File Role Description
  Plain text file Handler.php Class Class source

  Files folder image Files  /  app  /  Http  
File Role Description
Files folder imageControllers (1 file, 1 directory)
Files folder imageMiddleware (8 files)
Files folder imageResources (2 files)
  Plain text file Kernel.php Class Class source

  Files folder image Files  /  app  /  Http  /  Controllers  
File Role Description
Files folder imageProducts (2 files)
  Plain text file Controller.php Class Class source

  Files folder image Files  /  app  /  Http  /  Controllers  /  Products  
File Role Description
  Plain text file ProductController.php Class Class source
  Plain text file RecommendedController.php Class Class source

  Files folder image Files  /  app  /  Http  /  Middleware  
File Role Description
  Plain text file Authenticate.php Class Class source
  Plain text file CheckForMaintenanceMode.php Class Class source
  Plain text file EncryptCookies.php Class Class source
  Plain text file RedirectIfAuthenticated.php Class Class source
  Plain text file TrimStrings.php Class Class source
  Plain text file TrustHosts.php Class Class source
  Plain text file TrustProxies.php Class Class source
  Plain text file VerifyCsrfToken.php Class Class source

  Files folder image Files  /  app  /  Http  /  Resources  
File Role Description
  Plain text file CityResource.php Class Class source
  Plain text file ProductResource.php Class Class source

  Files folder image Files  /  app  /  Providers  
File Role Description
  Plain text file AppServiceProvider.php Class Class source
  Plain text file AuthServiceProvider.php Class Class source
  Plain text file BroadcastServiceProvider.php Class Class source
  Plain text file EventServiceProvider.php Class Class source
  Plain text file RouteServiceProvider.php Class Class source

  Files folder image Files  /  app  /  Services  
File Role Description
  Plain text file ApiResponse.php Class Class source
  Plain text file meteoService.php Class Class source

  Files folder image Files  /  bootstrap  
File Role Description
  Plain text file app.php Class Class source

  Files folder image Files  /  config  
File Role Description
  Plain text file app.php Class Class source
  Plain text file auth.php Class Class source
  Accessible without login Plain text file broadcasting.php Aux. Auxiliary script
  Accessible without login Plain text file cache.php Aux. Auxiliary script
  Accessible without login Plain text file cors.php Aux. Auxiliary script
  Accessible without login Plain text file database.php Aux. Auxiliary script
  Accessible without login Plain text file filesystems.php Aux. Auxiliary script
  Accessible without login Plain text file hashing.php Aux. Auxiliary script
  Plain text file logging.php Class Class source
  Accessible without login Plain text file mail.php Aux. Auxiliary script
  Accessible without login Plain text file queue.php Aux. Auxiliary script
  Accessible without login Plain text file services.php Aux. Auxiliary script
  Accessible without login Plain text file session.php Aux. Auxiliary script
  Accessible without login Plain text file view.php Aux. Auxiliary script

  Files folder image Files  /  database  
File Role Description
Files folder imagefactories (2 files)
Files folder imagemigrations (3 files)
Files folder imageseeds (1 file)

  Files folder image Files  /  database  /  factories  
File Role Description
  Plain text file ProductFactory.php Class Class source
  Plain text file UserFactory.php Class Class source

  Files folder image Files  /  database  /  migrations  
File Role Description
  Plain text file 2014_10_12_000000_create_users_table.php Class Class source
  Plain text file 2019_08_19_000000_...iled_jobs_table.php Class Class source
  Plain text file 2020_06_21_153338_..._products_table.php Class Class source

  Files folder image Files  /  database  /  seeds  
File Role Description
  Plain text file DatabaseSeeder.php Class Class source

  Files folder image Files  /  public  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Plain text file index.php Class Class source
  Accessible without login Plain text file robots.txt Doc. Documentation
  Accessible without login Plain text file web.config Data Auxiliary data

  Files folder image Files  /  resources  
File Role Description
Files folder imagejs (2 files)
Files folder imagelang (1 directory)
Files folder imagesass (1 file)
Files folder imageviews (1 file)

  Files folder image Files  /  resources  /  js  
File Role Description
  Accessible without login Plain text file app.js Data Auxiliary data
  Accessible without login Plain text file bootstrap.js Data Auxiliary data

  Files folder image Files  /  resources  /  lang  
File Role Description
Files folder imageen (4 files)

  Files folder image Files  /  resources  /  lang  /  en  
File Role Description
  Accessible without login Plain text file auth.php Aux. Auxiliary script
  Accessible without login Plain text file pagination.php Aux. Auxiliary script
  Accessible without login Plain text file passwords.php Aux. Auxiliary script
  Accessible without login Plain text file validation.php Aux. Auxiliary script

  Files folder image Files  /  resources  /  sass  
File Role Description
  Accessible without login Plain text file app.scss Data Auxiliary data

  Files folder image Files  /  resources  /  views  
File Role Description
  Accessible without login Plain text file welcome.blade.php Aux. Auxiliary script

  Files folder image Files  /  routes  
File Role Description
  Accessible without login Plain text file api.php Example Example script
  Accessible without login Plain text file channels.php Example Example script
  Accessible without login Plain text file console.php Example Example script
  Accessible without login Plain text file web.php Aux. Auxiliary script

  Files folder image Files  /  tests  
File Role Description
Files folder imageFeature (1 file)
Files folder imageUnit (1 file)
  Plain text file CreatesApplication.php Class Class source
  Plain text file TestCase.php Class Class source

  Files folder image Files  /  tests  /  Feature  
File Role Description
  Plain text file ExampleTest.php Class Class source

  Files folder image Files  /  tests  /  Unit  
File Role Description
  Plain text file ExampleTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:27
This week:8
All time:10,656
This week:17Up
For more information send a message to info at phpclasses dot org.