Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programmer: Roman Martushev

Similar presentations


Presentation on theme: "Programmer: Roman Martushev"— Presentation transcript:

1 Programmer: Roman Martushev
Flight Tracker Programmer: Roman Martushev

2 Construction Using Laravel framework is a very helpful tool and I used lots of its resources Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern Also setup my project in docker What is docker? Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. What is a container? Containers are a way to package software in a format that can run isolated on a shared operating system. Unlike VMs, containers do not bundle a full operating system - only libraries and settings required to make the software work are needed.

3 The beginning I setup a route which then triggers a controller method
Then I created a controller Then a view to see that my information actually went through Using a simple JavaScript function I then reload the page every 8 hours to run my controller method Meaning I have to have my computer running 24/7 (Not a good implementation but it “works”) I did want to set up a cron job that basically executes a command automatically which does the same thing my controller method does besides returning a view but since I am on my localhost and not in production it was a bit more tricky so I decided against it.

4 Getting the information
I used googles flights API to get my information I simply pass in my the parameter google expects to my getFlights method I simply used googles curl command they gave me to get the information I needed I then receive a json from the request and decode it which makes it into a collection (object) that I can get data from

5 Exporting to a CSV At first I simply took my information and exported it to a csv but thought this isn’t good enough ghts.csv

6 Migrations I then used Laravel’s migration tool which basically lets me manipulate a database so I created a table in my database ations/2017_09_12_185659_addFlightsTable.php

7 Model (flights class) I then created a model class Flights that allows me to manipulate the given table So if we then return to my controller method you can see where I save the data to my database rollers/FlightController.php

8 Final Step Since I had my new information going into a database and had all my old info in a csv I decided to write a function to move everything over to my database which is called csv in my controller

9 Any Questions?


Download ppt "Programmer: Roman Martushev"

Similar presentations


Ads by Google