PHP code example of adewra / laravel-traffic-scotland

1. Go to this page and download the library: Download adewra/laravel-traffic-scotland library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

adewra / laravel-traffic-scotland example snippets


Adewra\TrafficScotland\TrafficScotlandServiceProvider::class,

    'functionality' => [
        'incidents' => true,
        'roadworks' => [
            'current' => true,
            'planned' => true,
        ],
        'events' => true,
    ],
    'collection_methods' => [
        'api' => true,
        'rss_feeds' => false,
        'webpage_scraping' => false,
    ],
    'storage' => true

    $incidents = TrafficScotland::incidents();
  

    $roadworks = TrafficScotland::roadworks(true, true);
   

   $roadworks = TrafficScotland::events();
  

> php artisan vendor:publish --tag=config --tag=migrations --tag=seeds

php artisan migrate --path=/packages/adewra/trafficscotland/src/migrations

    php artisan trafficscotland:incidents
  

    php artisan trafficscotland:roadworks
   

   php artisan trafficscotland:events