Download the PHP package adewra/laravel-traffic-scotland without Composer
On this page you can find all versions of the php package adewra/laravel-traffic-scotland. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download adewra/laravel-traffic-scotland
More information about adewra/laravel-traffic-scotland
Files in adewra/laravel-traffic-scotland
Package laravel-traffic-scotland
Short Description Access Traffic Scotland's Current Incidents, Live Traffic Cameras, Unplanned Events, Roadworks, Future Roadworks, Traffic Status, Variable Message Signs and Journey Times.
License MIT
Homepage https://trafficscotland.adewra.com/
Informations about the package laravel-traffic-scotland
Traffic Scotland
A package for retrieving the latest traffic information in Scotland through Traffic Scotland.
Designed primarily for the Laravel & Lumen frameworks, you can easily just drop this into any PHP project using Composer.
Table of contents
- Installation
- Upgrading
- Testing
- Configuration
- Troubleshooting
- Package Features
- Minimum Viable Product
- Examples
Installation
Installation using composer:
Laravel/Lumen version compatibility
Version | Status |
---|---|
4.x.x | Untested |
5.x.x | Untested |
6.x.x | Untested |
7.0 | Test Build |
For Lumen and Laravel versions earlier than 5.5
you'll also need to add the service provider in config/app.php
:
Upgrading
This package is still in Pre-release
, upgrade instructions will come when the first update is officially released.
Testing
Configuration
To publish the configuration file run:
This will copy the configuration file to config/trafficscotland.php
.
Here is an example (and the default) configuration:
To run our database migrations that allow for storing of the data:
Troubleshooting
Troubleshooting hasn't been written yet.
Package features
Type | Included |
---|---|
Configuration | Yes |
Views | No |
Blade Directives | No |
Commands | Yes |
Migrations | Yes |
Translations | No |
Middleware | No |
Events | No |
Seeds | Yes |
MVP & potential future functionality
- [x] Incidents
- [x] Roadworks (Current & Planned)
- [x] Events (& Venues)
- [ ]
Status/Congestion - [ ] Traffic Cameras
- [ ] Queues
- [ ] Park and Ride
- [ ] Bulletins
- [ ] Weather Incidents
- [ ] Weather Stations
- [ ] Police Travel Warnings
- [ ] Variable Message Signs
- [ ] Highways England
- [ ] News
- [ ] Gritters
Methods
The preferred method for obtaining information is through Traffic Scotland's API that is utilised by the mobile version of their website.
Alternative methods include use of Datex II Service, RSS Feeds or through scraping the web pages.
Examples
Retrieving Current Incidents
Retrieving Roadworks
Retrieving Events
Lessons Learned
- My original choice of HTTP client Goutte isn't able to handle Traffic Scotland's website's javascript based navigation and as such, I should have gone with Selenium 2 from the beginning. Using Behat's Mink I am able to easily switch between both.
All versions of laravel-traffic-scotland with dependencies
ext-json Version *
illuminate/http Version ^7.0
illuminate/support Version ^7.0
illuminate/database Version ^7.0
illuminate/routing Version ^7.0
illuminate/config Version ^7.0
behat/mink Version ^1.7
behat/mink-selenium2-driver Version ^1.4