FabioFratini 1 gadu atpakaļ
vecāks
revīzija
6255fe2b4d
100 mainītis faili ar 15218 papildinājumiem un 0 dzēšanām
  1. BIN
      .DS_Store
  2. 15 0
      .editorconfig
  3. 46 0
      .env.example
  4. 5 0
      .gitattributes
  5. 13 0
      .gitignore
  6. 13 0
      .styleci.yml
  7. 38 0
      .vscode/launch.json
  8. BIN
      app/.DS_Store
  9. 21 0
      app/BreakingNews.php
  10. 382 0
      app/Calendar.php
  11. 135 0
      app/CalendarGame.php
  12. 26 0
      app/Category.php
  13. 41 0
      app/Console/Kernel.php
  14. 129 0
      app/Event.php
  15. 21 0
      app/EventAdv.php
  16. 55 0
      app/Exceptions/Handler.php
  17. 18 0
      app/Group.php
  18. 197 0
      app/Home.php
  19. 136 0
      app/Http/Controllers/BreakingNewsController.php
  20. 441 0
      app/Http/Controllers/CalendarController.php
  21. 139 0
      app/Http/Controllers/CategoryController.php
  22. 13 0
      app/Http/Controllers/Controller.php
  23. 194 0
      app/Http/Controllers/EventAdvController.php
  24. 153 0
      app/Http/Controllers/EventController.php
  25. 144 0
      app/Http/Controllers/GroupController.php
  26. 1154 0
      app/Http/Controllers/NewsController.php
  27. 194 0
      app/Http/Controllers/PageAdvController.php
  28. 159 0
      app/Http/Controllers/PageController.php
  29. 107 0
      app/Http/Controllers/SeasonController.php
  30. 233 0
      app/Http/Controllers/SectionAdvController.php
  31. 131 0
      app/Http/Controllers/SectionController.php
  32. 167 0
      app/Http/Controllers/TeamController.php
  33. 94 0
      app/Http/Controllers/UserController.php
  34. 201 0
      app/Http/Controllers/VideoController.php
  35. 67 0
      app/Http/Kernel.php
  36. 21 0
      app/Http/Middleware/Authenticate.php
  37. 17 0
      app/Http/Middleware/CheckForMaintenanceMode.php
  38. 17 0
      app/Http/Middleware/EncryptCookies.php
  39. 27 0
      app/Http/Middleware/RedirectIfAuthenticated.php
  40. 18 0
      app/Http/Middleware/TrimStrings.php
  41. 20 0
      app/Http/Middleware/TrustHosts.php
  42. 23 0
      app/Http/Middleware/TrustProxies.php
  43. 17 0
      app/Http/Middleware/VerifyCsrfToken.php
  44. 97 0
      app/News.php
  45. 76 0
      app/Notifications/FacebookPost.php
  46. 71 0
      app/Notifications/TwitterPost.php
  47. 52 0
      app/Page.php
  48. 22 0
      app/PageAdv.php
  49. 29 0
      app/Providers/AppServiceProvider.php
  50. 30 0
      app/Providers/AuthServiceProvider.php
  51. 21 0
      app/Providers/BroadcastServiceProvider.php
  52. 34 0
      app/Providers/EventServiceProvider.php
  53. 80 0
      app/Providers/RouteServiceProvider.php
  54. 22 0
      app/Ranking.php
  55. 15 0
      app/Season.php
  56. 1032 0
      app/Section.php
  57. 21 0
      app/SectionAdv.php
  58. 32 0
      app/Team.php
  59. 39 0
      app/User.php
  60. 22 0
      app/Video.php
  61. 53 0
      artisan
  62. 84 0
      backup.sql
  63. 55 0
      bootstrap/app.php
  64. 2 0
      bootstrap/cache/.gitignore
  65. 6206 0
      composer.lock
  66. 232 0
      config/app.php
  67. 117 0
      config/auth.php
  68. 59 0
      config/broadcasting.php
  69. 104 0
      config/cache.php
  70. 34 0
      config/cors.php
  71. 147 0
      config/database.php
  72. 85 0
      config/filesystems.php
  73. 52 0
      config/hashing.php
  74. 104 0
      config/logging.php
  75. 110 0
      config/mail.php
  76. 89 0
      config/queue.php
  77. 46 0
      config/services.php
  78. 201 0
      config/session.php
  79. 14 0
      config/sitemap.php
  80. 36 0
      config/view.php
  81. BIN
      database/.DS_Store
  82. 2 0
      database/.gitignore
  83. 28 0
      database/factories/UserFactory.php
  84. BIN
      database/migrations/.DS_Store
  85. 38 0
      database/migrations/2014_10_12_000000_create_users_table.php
  86. 35 0
      database/migrations/2019_08_19_000000_create_failed_jobs_table.php
  87. 34 0
      database/migrations/2020_06_09_104500_create_sections_table.php
  88. 46 0
      database/migrations/2020_06_09_114500_create_news_table.php
  89. 40 0
      database/migrations/2020_06_12_164000_add_meta_fields_to_news_table.php
  90. 52 0
      database/migrations/2020_06_15_092000_add_layout_fields_to_sections_table.php
  91. 32 0
      database/migrations/2020_06_17_123000_add_slug_to_sections_table.php
  92. 34 0
      database/migrations/2020_06_17_143000_add_before_after_to_sections_table.php
  93. 38 0
      database/migrations/2020_06_17_163000_create_home_table.php
  94. 42 0
      database/migrations/2020_06_17_213000_add_files_fields_to_news_table.php
  95. 43 0
      database/migrations/2020_06_23_123000_create_pages_table.php
  96. 37 0
      database/migrations/2020_06_23_123100_create_events_table.php
  97. 40 0
      database/migrations/2020_06_29_151000_create_section_advs_table.php
  98. 40 0
      database/migrations/2020_06_29_151100_create_page_advs_table.php
  99. 36 0
      database/migrations/2020_06_29_173700_add_relation_fields_to_news_table.php
  100. 34 0
      database/migrations/2020_07_07_161000_add_adv_fields_to_home_table.php

BIN
.DS_Store


+ 15 - 0
.editorconfig

@@ -0,0 +1,15 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[*.{yml,yaml}]
+indent_size = 2

+ 46 - 0
.env.example

@@ -0,0 +1,46 @@
+APP_NAME=Laravel
+APP_ENV=local
+APP_KEY=
+APP_DEBUG=true
+APP_URL=http://localhost
+
+LOG_CHANNEL=stack
+
+DB_CONNECTION=mysql
+DB_HOST=127.0.0.1
+DB_PORT=3306
+DB_DATABASE=laravel
+DB_USERNAME=root
+DB_PASSWORD=
+
+BROADCAST_DRIVER=log
+CACHE_DRIVER=file
+QUEUE_CONNECTION=sync
+SESSION_DRIVER=file
+SESSION_LIFETIME=120
+
+REDIS_HOST=127.0.0.1
+REDIS_PASSWORD=null
+REDIS_PORT=6379
+
+MAIL_MAILER=smtp
+MAIL_HOST=smtp.mailtrap.io
+MAIL_PORT=2525
+MAIL_USERNAME=null
+MAIL_PASSWORD=null
+MAIL_ENCRYPTION=null
+MAIL_FROM_ADDRESS=null
+MAIL_FROM_NAME="${APP_NAME}"
+
+AWS_ACCESS_KEY_ID=
+AWS_SECRET_ACCESS_KEY=
+AWS_DEFAULT_REGION=us-east-1
+AWS_BUCKET=
+
+PUSHER_APP_ID=
+PUSHER_APP_KEY=
+PUSHER_APP_SECRET=
+PUSHER_APP_CLUSTER=mt1
+
+MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
+MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

+ 5 - 0
.gitattributes

@@ -0,0 +1,5 @@
+* text=auto
+*.css linguist-vendored
+*.scss linguist-vendored
+*.js linguist-vendored
+CHANGELOG.md export-ignore

+ 13 - 0
.gitignore

@@ -0,0 +1,13 @@
+/node_modules
+/public/hot
+/public/storage
+/public/files
+/storage/*.key
+/vendor
+.env
+.env.backup
+.phpunit.result.cache
+Homestead.json
+Homestead.yaml
+npm-debug.log
+yarn-error.log

+ 13 - 0
.styleci.yml

@@ -0,0 +1,13 @@
+php:
+  preset: laravel
+  disabled:
+    - unused_use
+  finder:
+    not-name:
+      - index.php
+      - server.php
+js:
+  finder:
+    not-name:
+      - webpack.mix.js
+css: true

+ 38 - 0
.vscode/launch.json

@@ -0,0 +1,38 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Launch built-in server and debug",
+            "type": "php",
+            "request": "launch",
+            "runtimeArgs": [
+                "-S",
+                "localhost:8000",
+                "-t",
+                "."
+            ],
+            "port": 9003,
+            "serverReadyAction": {
+                "action": "openExternally"
+            }
+        },
+        {
+            "name": "Debug current script in console",
+            "type": "php",
+            "request": "launch",
+            "program": "${file}",
+            "cwd": "${fileDirname}",
+            "externalConsole": false,
+            "port": 9003
+        },
+        {
+            "name": "Listen for Xdebug",
+            "type": "php",
+            "request": "launch",
+            "port": 9003
+        }
+    ]
+}

BIN
app/.DS_Store


+ 21 - 0
app/BreakingNews.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Notifications\Notifiable;
+
+class BreakingNews extends Model
+{
+
+    use Notifiable;
+    
+    protected $fillable = [
+        'title',
+        'online',
+        'date',
+        'position'
+    ];
+
+
+}

+ 382 - 0
app/Calendar.php

@@ -0,0 +1,382 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+use App\CalendarGame;
+
+class Calendar extends Model
+{
+
+    protected $fillable = [
+        'name',
+        'section_id',
+        'region_id',
+        'season_id',
+        'category_id',
+        'group_id',
+        'type',
+        'position',
+        'archived'
+    ];
+
+    public function season()
+    {
+        return $this->belongsTo('App\Season');
+    }
+
+    public function section()
+    {
+        return $this->belongsTo('App\Section');
+    }
+
+    public function region()
+    {
+        return $this->belongsTo('App\Section');
+    }
+
+    public function category()
+    {
+        return $this->belongsTo('App\Category');
+    }
+
+    public function group()
+    {
+        return $this->belongsTo('App\Group');
+    }
+
+    public function getRates()
+    {
+
+        /*
+        Penalizzazioni
+
+        Se mi ritiro prima del girone di ritorno
+        Mi ritiro alla 10
+        Dall’11 in poi scrivo riposo
+
+        Gestione punti penalizzazione rinunce
+
+        Se dal ritorno, quelle prima valide, quelle dopo il ritiro 0-6 tavolino
+
+        Se è stata esclusa in classifica tutto a 0
+
+        */
+
+        $aRate = array();
+        // Carico le squadre
+        $games = CalendarGame::where('calendar_id', '=', $this->id)->get();
+        foreach($games as $g)
+        {
+
+            $home_team_id =  $g->home_team_id;
+            //if ($g->type == 'RITORNO')
+            //    $home_team_id =  $g->away_team_id;
+
+            $away_team_id =  $g->away_team_id;
+            //if ($g->type == 'RITORNO')
+            //    $homeaway_team_id =  $g->home_team_id;
+
+            if ($home_team_id != null && $away_team_id != null)
+            {
+
+                if (!isset($aRate[$home_team_id]))
+                {
+                    $t = Team::findOrFail($home_team_id);
+                    $points = 0;
+                    if ($t->penality > 0)
+                        $points -= $t->penality;
+                    $penality = '';
+                    $order = 0;
+                    if ($t->excluded)
+                    {
+                        $penality .= 'Esclusa dal campionato';// dalla ' . $t->day . ' giornata di ' . $t->type;
+                        $order = -999;
+                    }
+                    if ($t->type != '' && $t->type != '-' && !$t->excluded)
+                    {
+                        $penality .= 'Ritirata dal campionato';// dalla ' . $t->day . ' giornata di ' . $t->type;
+                        $order = -999;
+                    }
+                    if ($t->penality > 0 && $penality == '')
+                    {
+                        $penality .= $t->penality . ' punt' . ($t->penality > 1 ? 'i' : 'o') . ' di penalizzazione';
+                        // $order = -555;
+                    }
+                    $aRate[$home_team_id] = array('team' => $g->homeTeam->name, 'POINTS' => $points, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'penality' => $penality, 'order' => $order);
+                }
+
+                if (!isset($aRate[$away_team_id]))
+                {
+                    $t = Team::findOrFail($away_team_id);
+                    $points = 0;
+                    if ($t->penality > 0)
+                        $points -= $t->penality;
+                    $penality = '';
+                    $order = 0;
+                    if ($t->excluded)
+                    {
+                        $penality .= 'Esclusa dal campionato';// dalla ' . $t->day . ' giornata di ' . $t->type;
+                        $order = -999;
+                    }
+                    if ($t->type != '' && $t->type != '-' && !$t->excluded)
+                    {
+                        $penality .= 'Ritirata dal campionato';// dalla ' . $t->day . ' giornata di ' . $t->type;
+                        $order = -999;
+                    }
+                    if ($t->penality > 0 && $penality == '')
+                    {
+                        $penality .= $t->penality . ' punt' . ($t->penality > 1 ? 'i' : 'o') . ' di penalizzazione';
+                        // $order = -555;
+                    }
+                    $aRate[$away_team_id] = array('team' => $g->awayTeam->name, 'POINTS' => $points, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'penality' => $penality, 'order' => $order);
+                }
+
+                if ($home_team_id != NULL && $away_team_id != NULL && $g->played)
+                {
+                    if (!isset($aRate[$home_team_id]))
+                    {
+                        $t = Team::findOrFail($home_team_id);
+                        $points = 0;
+                        if ($t->penality > 0)
+                            $points -= $t->penality;
+                        $aRate[$home_team_id] = array('team' => $g->homeTeam->name, 'POINTS' => $points, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'order' => $order);
+                    }
+
+                    if (!isset($aRate[$away_team_id]))
+                    {
+                        $t = Team::findOrFail($away_team_id);
+                        $points = 0;
+                        if ($t->penality > 0)
+                            $points -= $t->penality;
+                        $aRate[$away_team_id] = array('team' => $g->awayTeam->name, 'POINTS' => $points, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'order' => $order);
+                    }
+
+                    // Controllo la squadra di casa
+                    $t = Team::findOrFail($home_team_id);
+
+                    $p_home = '';
+                    $home_order = 0;
+                    $home_pen = false;
+                    $home_no_game = false;
+                    if ($t->excluded)
+                    {
+                        $home_pen = true;
+                        $home_order = -999;
+                        $p_home .= 'Esclusa dal campionato';// dalla ' . $t->day . ' giornata di ' . $t->type;
+                        $aRate[$home_team_id] = array('team' => $g->homeTeam->name, 'POINTS' => 0, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'order' => $home_order, 'penality' => $p_home);
+                    }
+                    if ($t->type != '' && $t->type != '-' && !$t->excluded)
+                    {
+                        $home_pen = true;
+                        $home_order = -999;
+                        $p_home .= 'Ritirata dal campionato';// dalla ' . $t->day . ' giornata di ' . $t->type;
+                        $aRate[$home_team_id] = array('team' => $g->homeTeam->name, 'POINTS' => 0, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'order' => $home_order, 'penality' => $p_home);
+                    }
+                    if ($t->penality > 0 && $p_home == '')
+                    {
+                        $p_home .= $t->penality . ' punt' . ($t->penality > 1 ? 'i' : 'o') . ' di penalizzazione';
+                        //$home_order = -555;
+                    }
+
+
+                    $t = Team::findOrFail($away_team_id);
+                    $p_away = '';
+                    $away_order = 0;
+                    $away_pen = false;
+                    $away_no_game = false;
+                    if ($t->excluded)
+                    {
+                        $away_pen = true;
+                        $away_order = -999;
+                        $p_away .= 'Esclusa dal campionato';// dalla ' . $t->day . ' giornata di ' . $t->type;
+                        $aRate[$away_team_id] = array('team' => $g->awayTeam->name, 'POINTS' => 0, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'order' => $away_order, 'penality' => $p_away);
+                    }
+                    if ($t->type != '' && $t->type != '-' && !$t->excluded)
+                    {
+                        $away_pen = true;
+                        $away_order = -999;
+                        $p_away .= 'Ritirata dal campionato';// dalla ' . $t->day . ' giornata di ' . $t->type;
+                        $aRate[$away_team_id] = array('team' => $g->awayTeam->name, 'POINTS' => 0, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'order' => $away_order, 'penality' => $p_away);
+                    }
+                    if ($t->penality > 0 && $p_away == '')
+                    {
+                        $p_away .= $t->penality . ' punt' . ($t->penality > 1 ? 'i' : 'o') . ' di penalizzazione';
+                        // $away_order = -555;
+                    }
+
+                    // HOME
+                    $t = Team::findOrFail($home_team_id);
+                    if (($t->type != '' && $t->type != '-') || $t->excluded)
+                    {
+                        if ($t->type == 'andata')
+                        {
+                            $home_no_game = true;
+                            $g->home_goals = 0;
+                            $g->home_points = 0;
+                            $g->away_goals = 0;
+                            $g->away_points = 0;
+                            /*
+                            if ($g->type == 'ANDATA')
+                            {
+                                if ($g->day > $t->day)
+                                {
+                                    $g->home_goals = 0;
+                                    $g->home_points = 0;
+                                }
+                            }
+                            if ($g->type == 'RITORNO')
+                            {
+                                $g->home_goals = 0;
+                                $g->home_points = 0;
+                            }
+                            */
+                        }
+                        if ($t->type == 'ritorno')
+                        {
+                            if ($g->type == 'RITORNO')
+                            {
+                                if ($g->day > $t->day)
+                                {
+                                    $g->home_goals = 0;
+                                    $g->home_points = 0;
+                                    $g->away_goals = 6;
+                                    $g->away_points = 3;
+                                }
+                            }
+                        }
+                    }
+
+                    // AWAY
+                    $t = Team::findOrFail($away_team_id);
+                    if (($t->type != '' && $t->type != '-') || $t->excluded)
+                    {
+                        if ($t->type == 'andata')
+                        {
+                            $away_no_game = true;
+                            $g->away_goals = 0;
+                            $g->away_points = 0;
+                            $g->home_goals = 0;
+                            $g->home_points = 0;
+                            /*if ($g->type == 'ANDATA')
+                            {
+                                if ($g->day > $t->day)
+                                {
+                                    $g->away_goals = 0;
+                                    $g->away_points = 0;
+                                }
+                            }
+                            if ($g->type == 'RITORNO')
+                            {
+                                $g->away_goals = 0;
+                                $g->away_points = 0;
+                            }*/
+                        }
+                        if ($t->type == 'ritorno')
+                        {
+                            if ($g->type == 'RITORNO')
+                            {
+                                if ($g->day > $t->day)
+                                {
+                                    $g->away_goals = 0;
+                                    $g->away_points = 0;
+                                    $g->home_goals = 6;
+                                    $g->home_points = 3;
+                                }
+                            }
+                        }
+                    }
+
+                    $c_home = $aRate[$home_team_id];
+                    $POINTS = $c_home["POINTS"] + $g->home_points;
+                    if ($home_order == -999)
+                        $aRate[$home_team_id] = array('team' => $g->awayTeam->name, 'POINTS' => 0, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'order' => $away_order, 'penality' => $p_home);
+
+                    if ($g->played && !$away_no_game)
+                    {
+                        $PG = $c_home["PG"] + ($g->played ? 1 : 0);
+                        $V = $c_home["V"] + ($g->home_goals > $g->away_goals ? 1 : 0);
+                        $N = $c_home["N"] + ($g->home_goals == $g->away_goals ? 1 : 0);
+                        $P = $c_home["P"] + ($g->home_goals < $g->away_goals ? 1 : 0);
+                        $GF = $c_home["GF"] + $g->home_goals;
+                        $GS = $c_home["GS"] + $g->away_goals;
+                        $DR = $GF - $GS;
+                    }
+                    else
+                    {
+                        $PG = $c_home["PG"];
+                        $V = $c_home["V"];
+                        $N = $c_home["N"];
+                        $P = $c_home["P"];
+                        $GF = $c_home["GF"];
+                        $GS = $c_home["GS"];
+                        $DR = $GF - $GS;
+                    }
+
+                    if (!$home_pen)
+                        $aRate[$home_team_id] = array('team' => $c_home["team"], 'POINTS' => $POINTS, 'PG' => $PG, 'V' => $V, 'N' => $N, 'P' => $P, 'GF' => $GF, 'GS' => $GS, 'DR' => $DR, 'penality' => $p_home, 'order' => $home_order);
+                    else
+                        $aRate[$home_team_id] = array('team' => $c_home["team"], 'POINTS' => 0, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'penality' => $p_home, 'order' => $home_order);
+
+                    $c_away = $aRate[$away_team_id];
+                    $POINTS = $c_away["POINTS"] + $g->away_points;
+                    if ($away_order == -999)
+                        $POINTS = 0;
+
+                    if ($g->played && !$home_no_game)
+                    {
+                        $PG = $c_away["PG"] + ($g->played ? 1 : 0);
+                        $V = $c_away["V"] + ($g->away_goals > $g->home_goals ? 1 : 0);
+                        $N = $c_away["N"] + ($g->away_goals == $g->home_goals ? 1 : 0);
+                        $P = $c_away["P"] + ($g->away_goals < $g->home_goals ? 1 : 0);
+                        $GF = $c_away["GF"] + $g->away_goals;
+                        $GS = $c_away["GS"] + $g->home_goals;
+                        $DR = $GF - $GS;
+                    }
+                    else
+                    {
+                        $PG = $c_away["PG"];
+                        $V = $c_away["V"];
+                        $N = $c_away["N"];
+                        $P = $c_away["P"];
+                        $GF = $c_away["GF"];
+                        $GS = $c_away["GS"];
+                        $DR = $GF - $GS;
+                    }
+
+                    if (!$away_pen)
+                        $aRate[$away_team_id] = array('team' => $c_away["team"],  'POINTS' => $POINTS,'PG' => $PG, 'V' => $V, 'N' => $N, 'P' => $P, 'GF' => $GF, 'GS' => $GS, 'DR' => $DR, 'penality' => $p_away, 'order' => $away_order);
+                    else
+                        $aRate[$away_team_id] = array('team' => $c_away["team"], 'POINTS' => 0, 'PG' => 0, 'V' => 0, 'N' => 0, 'P' => 0, 'GF' => 0, 'GS' => 0, 'DR' => 0, 'penality' => $p_away, 'order' => $away_order);
+
+
+                }
+
+            }
+
+        }
+
+        $sorts = array('order' => 'desc', 'POINTS' => 'desc', 'DR' => 'desc', 'GF' => 'desc');
+
+        usort($aRate, function($a, $b) use ($sorts) {
+            foreach($sorts as $field => $direction) {
+                if ($a[$field] != $b[$field]) {
+                    if ($direction == 'asc') {
+                        return $a[$field] < $b[$field] ? -1 : 1;
+                    }
+                    return $a[$field] < $b[$field] ? 1 : -1;
+                }
+            }
+            return 0;
+        });
+
+        return $aRate;
+
+    }
+
+    public function by_points($a, $b)
+    {
+        return $a['POINTS'] > $b['POINTS'];
+    }
+
+}

+ 135 - 0
app/CalendarGame.php

@@ -0,0 +1,135 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class CalendarGame extends Model
+{
+
+    protected $fillable = [
+        'calendar_id',
+        'home_team_id',
+        'away_team_id',
+        'date',
+        'day',
+        'type',
+        'home_goals',
+        'away_goals',
+        'home_points',
+        'away_points',
+        'played'
+    ];
+
+    public function homeTeam()
+    {
+        return $this->belongsTo('App\Team');        
+    }
+
+    public function awayTeam()
+    {
+        return $this->belongsTo('App\Team');        
+    }
+
+    public function getHomeTeam()
+    {
+
+        $team_id =  $this->home_team_id;
+        //if ($this->type == 'RITORNO')
+        //    $team_id =  $this->away_team_id;
+
+        if ($team_id == null)
+        {
+            $t = new Team();
+            $t->name = 'Riposo';
+        }
+        else
+        {
+            $t = Team::findOrFail($team_id); // $this->belongsTo('App\Team');
+
+            if (($t->type != '' && $t->type != '-') || $t->excluded)
+            {
+                if ($t->type == 'andata')
+                {
+                    // $t->name = 'Riposo';
+                }
+                
+            }
+            
+        }
+        return $t;
+    }
+
+    public function getAwayTeam()
+    {
+        $team_id =  $this->away_team_id;
+        //if ($this->type == 'RITORNO')
+        //    $team_id =  $this->home_team_id;
+
+        if ($team_id == null)
+        {
+            $t = new Team();
+            $t->name = 'Riposo';
+        }
+        else
+        {
+            $t = Team::findOrFail($team_id); // $this->belongsTo('App\Team');
+            if (($t->type != '' && $t->type != '-') || $t->excluded)
+            {
+                if ($t->type == 'andata')
+                {
+                    // $t->name = 'Riposo';
+                }
+            }
+            /*
+            if ($t->excluded)
+            {
+                $t->name = 'Riposo';
+            }
+            else
+            {
+                if (strtoupper($t->type) == 'ANDATA')
+                {
+                    if ($this->type == 'ANDATA')
+                    {
+                        if ($this->day > $t->day)
+                        {
+                            $t->name = 'Riposo';
+                        }
+                    }
+                }
+            }*/
+        }
+        return $t;
+    }
+
+    public function getResult()
+    {
+
+        $res = '';
+        //if ($this->played)
+        //{
+            if($this->away_team_id != null && $this->home_team_id != null)
+            {
+
+                // Controllo se una squadra è stata esclusa
+                $exc = false;
+                $t = Team::findOrFail($this->home_team_id);
+                if (strtoupper($t->type) == 'ANDATA') // && $t->type != '-') || $t->excluded)
+                    $exc = true;
+                $t = Team::findOrFail($this->away_team_id);
+                if (strtoupper($t->type) == 'ANDATA') // && $t->type != '-') || $t->excluded)
+                    $exc = true;
+                if ($exc)
+                    $res = "NV";
+                else
+                    $res = $this->home_goals . " - " . $this->away_goals;
+
+            }
+        //}
+        //$res = $this->home_goals . " - " . $this->away_goals;
+        return $res;
+
+    }      
+
+}

+ 26 - 0
app/Category.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace App;
+
+use App\News;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Category extends Model
+{
+
+    protected $fillable = [
+        'name',
+        'type',
+        'position',
+        'image',
+        'grp',
+        'url'
+    ];
+
+    public function groups()
+    {
+        return $this->hasMany('App\Group');
+    }
+
+}

+ 41 - 0
app/Console/Kernel.php

@@ -0,0 +1,41 @@
+<?php
+
+namespace App\Console;
+
+use Illuminate\Console\Scheduling\Schedule;
+use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
+
+class Kernel extends ConsoleKernel
+{
+    /**
+     * The Artisan commands provided by your application.
+     *
+     * @var array
+     */
+    protected $commands = [
+        //
+    ];
+
+    /**
+     * Define the application's command schedule.
+     *
+     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
+     * @return void
+     */
+    protected function schedule(Schedule $schedule)
+    {
+        // $schedule->command('inspire')->hourly();
+    }
+
+    /**
+     * Register the commands for the application.
+     *
+     * @return void
+     */
+    protected function commands()
+    {
+        $this->load(__DIR__.'/Commands');
+
+        require base_path('routes/console.php');
+    }
+}

+ 129 - 0
app/Event.php

@@ -0,0 +1,129 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Event extends Model
+{
+
+    protected $fillable = [
+        'title',
+        'text_short',
+        'text',
+        'image',
+        'slug',
+        'online',
+        'big',
+        'small1',
+        'small2',
+        'small3',
+        'small4'
+    ];
+
+    function loadLayout()
+    {
+
+        $this->data = $this;
+        if ($this->big != '')
+        {
+            $n = News::find($this->big);
+            if ($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+                $this->big = $n;
+            }
+        }
+        
+        if ($this->small1 != '')
+        {
+            $n = News::find($this->small1);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+                $this->small1 = $n;
+            }
+        }
+        if ($this->small2 != '')
+        {
+            $n = News::find($this->small2);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+                $this->small2 = $n;
+            }
+        }
+        if ($this->small3 != '')
+        {
+            $n = News::find($this->small3);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+                $this->small3 = $n;
+            }
+        }
+        if ($this->small4 != '')
+        {
+            $n = News::find($this->small4);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+                $this->small4 = $n;
+            }
+        }
+        if ($this->small5 != '')
+        {
+            $n = News::find($this->small5);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+                $this->small5 = $n;
+            }
+        }
+        if ($this->small6 != '')
+        {
+            $n = News::find($this->small6);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+                $this->small6 = $n;
+            }
+        }
+
+    }
+
+    public function advs()
+    {
+        return $this->hasMany('App\EventAdv');
+    }
+    
+    public function getAdvs()
+    {
+        
+        $advs['Sopra 234x60 1'] = array();
+        $advs['Sopra 234x60 2'] = array();
+        $advs['Sopra 234x60 3'] = array();
+        $advs['Sopra 234x60 4'] = array();
+        $advs['Sotto 234x60 1'] = array();
+        $advs['Sotto 234x60 2'] = array();
+        $advs['Sotto 234x60 3'] = array();
+        $advs['Sotto 234x60 4'] = array();
+        $advs['728x90'] = array();
+
+        $event_advs = $this->advs()->where('online', '=', true)->get();
+        foreach($event_advs as $a)
+        {
+            $advs[$a->position][] = $a;
+        }
+        return $advs;
+
+    }
+
+}

+ 21 - 0
app/EventAdv.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class EventAdv extends Model
+{
+
+    protected $fillable = [
+        'event_id',
+        'name',
+        'position',
+        'google_code',
+        'image',
+        'jingle',
+        'url',
+        'online'
+    ];
+
+}

+ 55 - 0
app/Exceptions/Handler.php

@@ -0,0 +1,55 @@
+<?php
+
+namespace App\Exceptions;
+
+use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
+use Throwable;
+
+class Handler extends ExceptionHandler
+{
+    /**
+     * A list of the exception types that are not reported.
+     *
+     * @var array
+     */
+    protected $dontReport = [
+        //
+    ];
+
+    /**
+     * A list of the inputs that are never flashed for validation exceptions.
+     *
+     * @var array
+     */
+    protected $dontFlash = [
+        'password',
+        'password_confirmation',
+    ];
+
+    /**
+     * Report or log an exception.
+     *
+     * @param  \Throwable  $exception
+     * @return void
+     *
+     * @throws \Exception
+     */
+    public function report(Throwable $exception)
+    {
+        parent::report($exception);
+    }
+
+    /**
+     * Render an exception into an HTTP response.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \Throwable  $exception
+     * @return \Symfony\Component\HttpFoundation\Response
+     *
+     * @throws \Throwable
+     */
+    public function render($request, Throwable $exception)
+    {
+        return parent::render($request, $exception);
+    }
+}

+ 18 - 0
app/Group.php

@@ -0,0 +1,18 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Group extends Model
+{
+
+    protected $fillable = [
+        'category_id',
+        'name',
+        'position',
+        'image',
+        'url'
+    ];
+
+}

+ 197 - 0
app/Home.php

@@ -0,0 +1,197 @@
+<?php
+
+namespace App;
+
+use App\News;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Home extends Model
+{
+
+    protected $table = 'home';
+
+    protected $fillable = [
+        'slide1',
+        'slide2',
+        'slide3',
+        'slide4',
+        'slide5',
+        'left',
+        'left1',
+        'left2',
+        'left3',
+        'left4',
+        'left5',
+        'right',
+        'right1',
+        'right2',
+        'right3',
+        'right4',
+        'right5',
+        'image',
+        'url',
+        'banner_top',
+        'banner_top_url',
+        'banner_top_google',
+        'banner_middle',
+        'banner_middle_url',
+        'banner_middle_google',
+        'banner_first',
+        'banner_first_url',
+        'banner_first_google',
+        'radio1_url',
+        'radio2_url',
+        'radio3_url',
+        'radio1_file',
+        'radio2_file',
+        'radio3_file',
+        'radio1_title',
+        'radio2_title',
+        'radio3_title',
+        'image_2',
+        'image_3',
+        'url_2',
+        'url_3',
+        'banner_underb',
+        'banner_underb_url',
+        'banner_underb_2',
+        'banner_underb_url_2',
+        'banner_underb_3',
+        'banner_underb_url_3',
+        'banner_underb_4',
+        'banner_underb_url_4',
+        'banner_underb_5',
+        'banner_underb_url_5',
+        'banner_underb_google',
+        'banner_top_2',
+        'banner_top_2_url',
+        'banner_middle_2',
+        'banner_middle_2_url',
+        'banner_first_2',
+        'banner_first_2_url',
+        'banner_top_3',
+        'banner_top_3_url',
+        'banner_top_4',
+        'banner_top_4_url',
+        'banner_top_5',
+        'banner_top_5_url',
+        'banner_middle_3',
+        'banner_middle_3_url',
+        'banner_middle_4',
+        'banner_middle_4_url',
+        'banner_middle_5',
+        'banner_middle_5_url',
+        'banner_first_3',
+        'banner_first_3_url',
+        'banner_first_4',
+        'banner_first_4_url',
+        'banner_first_5',
+        'banner_first_5_url',
+        'banner_right_top',
+        'banner_right_top_url',
+        'banner_right_top_2',
+        'banner_right_top_2_url',
+        'banner_right_top_3',
+        'banner_right_top_3_url',
+        'banner_right_top_4',
+        'banner_right_top_4_url',
+        'banner_right_top_5',
+        'banner_right_top_5_url',
+        'banner_right_top_google',
+        'banner_right_bottom',
+        'banner_right_bottom_url',
+        'banner_right_bottom_2',
+        'banner_right_bottom_2_url',
+        'banner_right_bottom_3',
+        'banner_right_bottom_3_url',
+        'banner_right_bottom_4',
+        'banner_right_bottom_4_url',
+        'banner_right_bottom_5',
+        'banner_right_bottom_5_url',
+        'banner_right_bottom_google',
+        'banner_right_big',
+        'banner_right_big_url',
+        'banner_right_big_2',
+        'banner_right_big_2_url',
+        'banner_right_big_3',
+        'banner_right_big_3_url',
+        'banner_right_big_4',
+        'banner_right_big_4_url',
+        'banner_right_big_5',
+        'banner_right_big_5_url',
+        'banner_right_big_google',
+    ];
+
+    function loadData()
+    {
+
+        $this->data = $this;
+        if ($this->slide1 != '')
+            $this->slide1 = @News::where('id', '=', $this->slide1)->first();
+        if ($this->slide2 != '')
+            $this->slide2 = @News::where('id', '=', $this->slide2)->first();
+        if ($this->slide3 != '')
+            $this->slide3 = @News::where('id', '=', $this->slide3)->first();
+        if ($this->slide4 != '')
+            $this->slide4 = @News::where('id', '=', $this->slide4)->first();
+        if ($this->slide5 != '')
+            $this->slide5 = @News::where('id', '=', $this->slide5)->first();
+        if ($this->left != '')
+            $this->left = @News::where('id', '=', $this->left)->first();
+        if ($this->left1 != '')
+            $this->left1 = @News::where('id', '=', $this->left1)->first();
+        if ($this->left2 != '')
+            $this->left2 = @News::where('id', '=', $this->left2)->first();
+        if ($this->left3 != '')
+            $this->left3 = @News::where('id', '=', $this->left3)->first();
+        if ($this->left4 != '')
+            $this->left4 = @News::where('id', '=', $this->left4)->first();
+        if ($this->left5 != '')
+            $this->left5 = @News::where('id', '=', $this->left5)->first();
+        if ($this->right1 != '')
+            $this->right1 = @News::where('id', '=', $this->right1)->first();
+        if ($this->right2 != '')
+            $this->right2 = @News::where('id', '=', $this->right2)->first();
+        if ($this->right3 != '')
+            $this->right3 = @News::where('id', '=', $this->right3)->first();
+        if ($this->right4 != '')
+            $this->right4 = @News::where('id', '=', $this->right4)->first();
+        if ($this->right5 != '')
+            $this->right5 = @News::where('id', '=', $this->right5)->first();
+
+    }
+
+    function hasSlider($type)
+    {
+        $tot = 0;
+        if ($type == 'left')
+        {
+            if(isset($this->left1) && $this->left1 != '')
+                $tot += 1;
+            if(isset($this->left2) && $this->left2 != '')
+                $tot += 1;
+            if(isset($this->left3) && $this->left3 != '')
+                $tot += 1;
+            if(isset($this->left4) && $this->left4 != '')
+                $tot += 1;
+            if(isset($this->left5) && $this->left5 != '')
+                $tot += 1;
+        }
+        if ($type == 'right')
+        {
+            if(isset($this->right1) && $this->right1 != '')
+                $tot += 1;
+            if(isset($this->right2) && $this->right2 != '')
+                $tot += 1;
+            if(isset($this->right3) && $this->right3 != '')
+                $tot += 1;
+            if(isset($this->right4) && $this->right4 != '')
+                $tot += 1;
+            if(isset($this->right5) && $this->right5 != '')
+                $tot += 1;
+        }
+        return $tot > 1;
+    }
+
+}

+ 136 - 0
app/Http/Controllers/BreakingNewsController.php

@@ -0,0 +1,136 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\BreakingNews;
+use Illuminate\Http\Request;
+use File;
+  
+class BreakingNewsController extends Controller
+{
+    
+    protected $rules = [
+        'title' => ['required']
+    ];
+
+    public function index()
+    {
+        $breaking_news = BreakingNews::orderBy('date', 'DESC')->get(); //->paginate(50);
+  
+        return view('breaking_news.index',compact('breaking_news'))
+            ->with('i', (request()->input('breaking_news', 1) - 1) * 5);
+    }
+   
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        return view('breaking_news.create');
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["online"] = true; //isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        $final_date = null;
+        if ($input["date"] != '')
+        {
+            list($dt, $time) = explode(" ", $input["date"]);
+            list($day, $month, $year) = explode("/", $dt);
+            $final_date = $year . "-" . $month . "-" . $day . " " . $time;
+        }
+        $input["date"] = $final_date;
+
+        BreakingNews::create($input);
+   
+        return redirect()->route('breaking_news.index')
+                        ->with('success','BreakingNews created successfully.');
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\BreakingNews  $breakingnews
+     * @return \Illuminate\Http\Response
+     */
+    public function show(BreakingNews $breaking_news)
+    {
+        return view('breaking_news.show',compact('breaking_news'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\BreakingNews  $breakingnews
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(BreakingNews $breaking_news)
+    {
+        $final_date = null;
+        if ($breaking_news->date != null)
+        {
+            list($dt, $time) = explode(" ", $breaking_news->date);
+            list($year, $month, $day) = explode("-", $dt);
+            $final_date = $day . "/" . $month . "/" . $year . " " . $time;
+        }
+        $breaking_news->date = $final_date;
+
+        return view('breaking_news.edit',compact('breaking_news'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\BreakingNews  $breakingnews
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, BreakingNews $breaking_news)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        $final_date = null;
+        if ($input["date"] != '')
+        {
+            list($dt, $time) = explode(" ", $input["date"]);
+            list($day, $month, $year) = explode("/", $dt);
+            $final_date = $year . "-" . $month . "-" . $day . " " . $time;
+        }
+        $input["date"] = $final_date;
+
+        $breaking_news->update($input);
+  
+        return redirect()->route('breaking_news.index')
+                        ->with('success','BreakingNews updated successfully');
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\BreakingNews  $breakingnews
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(BreakingNews $breaking_news)
+    {
+
+        $breaking_news->delete();
+  
+        return redirect()->route('breaking_news.index')
+                        ->with('success','BreakingNews deleted successfully');
+    }
+}

+ 441 - 0
app/Http/Controllers/CalendarController.php

@@ -0,0 +1,441 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\Calendar;
+use App\CalendarGame;
+use App\Category;
+use App\Season;
+use App\Group;
+use App\Team;
+use Illuminate\Http\Request;
+use File;
+
+class CalendarController extends Controller
+{
+
+    protected $rules = [
+        // 'name' => ['required']
+    ];
+
+    public function index()
+    {
+        if (isset($_GET["all"]))
+            $calendars = Calendar::orderBy('position')->orderBy('name')->get(); //->paginate(50);
+        else
+            $calendars = Calendar::where('archived', null)->orderBy('position')->orderBy('name')->get(); //->paginate(50);
+
+        return view('calendars.index',compact('calendars'))
+            ->with('i', (request()->input('page', 1) - 1) * 5);
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        $seasons = Season::orderBy('name')->pluck('name', 'id')->toArray();;
+        return view('calendars.create', compact('seasons'));
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+
+        //CalendarGame::truncate();
+        //Calendar::truncate();
+
+        $request->validate($this->rules);
+
+        $input = $request->all();
+        $input["name"] = '';
+        $calendar = Calendar::create($input);
+
+        // Creo le giornate
+        if(request()->file)
+        {
+
+            $file = request()->file;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/calendars"))
+                File::makeDirectory(public_path()."/files/calendars");
+
+            $path = public_path('files/calendars');
+
+            request()->file->move($path, $filename);
+
+            $handle = fopen($path . "/" . $filename, "r");
+            if ($handle)
+            {
+
+                $aTeams = array();
+
+                $aT = array("ANDATA", "RITORNO");
+
+                foreach($aT as $type)
+                {
+                    $date = '';
+                    $day = 0;
+                    $insert = false;
+
+                    $handle = fopen($path . "/" . $filename, "r");
+                    while (($line = fgets($handle)) !== false)
+                    {
+
+                        if (substr($line, 0, 3) == '.--' || substr($line, 0, 3) == '|--')
+                        {
+                            $insert = false;
+                        }
+
+                        if (strpos($line, $type . ':') !== false)
+                        {
+                            $day += 1;
+
+                            $tmp = $line;
+                            if ($type == 'ANDATA')
+                            {
+                                $start = strpos($tmp, '|');
+                                $end = strpos($tmp, '|', 1);
+                            }
+                            else
+                            {
+                                $start = strpos($tmp, 'RITORNO: ');
+                                $end = strrpos($tmp, '|');
+                            }
+
+                            if ($type == 'ANDATA')
+                            {
+                                $tmp = substr($tmp, $start + 1, $end - 1);
+                                $tmp = str_replace($type . ":", "", $tmp);
+                            }
+                            else
+                            {
+                                $tmp = substr($tmp, $start + 8, 10);
+                            }
+                            $tmp = trim($tmp);
+                            list($dt, $month, $year) = explode("/", $tmp);
+                            $date = "20" . $year . "-" . $month . "-" . $dt;
+
+                        }
+
+                        if($insert)
+                        {
+                            $tmp = $line;
+                            $tmp = trim(str_replace("|", "", $tmp));
+                            list($home, $away) = explode("-", $tmp);
+
+                            $home_team_id = $this->getTeam($home, $calendar->season_id);
+                            $away_team_id = $this->getTeam($away, $calendar->season_id);
+
+                            $calendar_game = new CalendarGame();
+                            $calendar_game->calendar_id = $calendar->id;
+                            $calendar_game->home_team_id = $type == 'ANDATA' ? $home_team_id : $away_team_id;
+                            $calendar_game->away_team_id = $type == 'ANDATA' ? $away_team_id : $home_team_id;
+                            $calendar_game->date = $date;
+                            $calendar_game->day = $day;
+                            $calendar_game->type = $type;
+                            $calendar_game->home_goals = null;
+                            $calendar_game->away_goals = null;
+                            $calendar_game->home_points = null;
+                            $calendar_game->away_points = null;
+                            $calendar_game->save();
+
+                        }
+
+                        if (substr($line, 0, 3) == '|--')
+                        {
+                            $insert = true;
+                        }
+
+                    }
+                }
+
+                fclose($handle);
+            }
+            else
+            {
+
+            }
+
+        }
+
+        return redirect()->route('calendars.index')
+                        ->with('success','Calendar created successfully.');
+    }
+
+    public function getTeam($team, $season_id)
+    {
+
+        $ret = 0;
+        $team = trim($team);
+
+        if (strpos(strtolower($team), 'riposa') !== false)
+        {
+            $ret = null;
+        }
+        else
+        {
+            $t = Team::where('name', '=', $team)->where('season_id', '=', $season_id)->first();
+            if($t == null)
+            {
+                $t = new Team();
+                $t->name = $team;
+                $t->type = '';
+                $t->season_id = $season_id;
+                $t->save();
+            }
+            $ret = $t->id;
+        }
+        return $ret;
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Calendar  $calendar
+     * @return \Illuminate\Http\Response
+     */
+    public function show(Calendar $calendar)
+    {
+        return view('calendars.show',compact('calendar'));
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Calendar  $calendar
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Calendar $calendar)
+    {
+        $seasons = Season::orderBy('name')->pluck('name', 'id')->toArray();;
+        return view('calendars.edit',compact('calendar', 'seasons'));
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Calendar  $calendar
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Calendar $calendar)
+    {
+        $request->validate($this->rules);
+
+        $input = $request->all();
+
+        $input["name"] = '';
+
+        // Creo le giornate
+        if(request()->file)
+        {
+
+            // Elimino il vecchio
+            $aTeams = array();
+
+            $games = CalendarGame::where('calendar_id', '=', $calendar->id)->get();
+            foreach($games as $game)
+            {
+                $home_team_id = $game->home_team_id;
+                $away_team_id = $game->away_team_id;
+
+                if ($home_team_id != null)
+                {
+                    if(!in_array($home_team_id, $aTeams, true))
+                    {
+                        array_push($aTeams, $home_team_id);
+                    }
+                }
+
+                if ($away_team_id != null)
+                {
+                    if(!in_array($away_team_id, $aTeams, true))
+                    {
+                        array_push($aTeams, $away_team_id);
+                    }
+                }
+
+                $game->delete();
+
+            }
+
+            foreach($aTeams as $team_id)
+            {
+                $th = Team::where('id', '=', $team_id)->first();
+                if ($th != null)
+                    $th->delete();
+            }
+
+            $file = request()->file;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/calendars"))
+                File::makeDirectory(public_path()."/files/calendars");
+
+            $path = public_path('files/calendars');
+
+            request()->file->move($path, $filename);
+
+            $handle = fopen($path . "/" . $filename, "r");
+            if ($handle)
+            {
+
+                $aTeams = array();
+
+                $aT = array("ANDATA", "RITORNO");
+
+                foreach($aT as $type)
+                {
+                    $date = '';
+                    $day = 0;
+                    $insert = false;
+
+                    $handle = fopen($path . "/" . $filename, "r");
+                    while (($line = fgets($handle)) !== false)
+                    {
+
+                        if (substr($line, 0, 3) == '.--' || substr($line, 0, 3) == '|--')
+                        {
+                            $insert = false;
+                        }
+
+                        if (strpos($line, $type . ':') !== false)
+                        {
+                            $day += 1;
+
+                            $tmp = $line;
+                            if ($type == 'ANDATA')
+                            {
+                                $start = strpos($tmp, '|');
+                                $end = strpos($tmp, '|', 1);
+                            }
+                            else
+                            {
+                                $start = strpos($tmp, 'RITORNO: ');
+                                $end = strrpos($tmp, '|');
+                            }
+
+                            if ($type == 'ANDATA')
+                            {
+                                $tmp = substr($tmp, $start + 1, $end - 1);
+                                $tmp = str_replace($type . ":", "", $tmp);
+                            }
+                            else
+                            {
+                                $tmp = substr($tmp, $start + 8, 10);
+                            }
+                            $tmp = trim($tmp);
+                            list($dt, $month, $year) = explode("/", $tmp);
+                            $date = "20" . $year . "-" . $month . "-" . $dt;
+
+                        }
+
+                        if($insert)
+                        {
+                            $tmp = $line;
+                            $tmp = trim(str_replace("|", "", $tmp));
+                            list($home, $away) = explode("-", $tmp);
+
+                            $home_team_id = $this->getTeam($home, $calendar->season_id);
+                            $away_team_id = $this->getTeam($away, $calendar->season_id);
+
+                            $calendar_game = new CalendarGame();
+                            $calendar_game->calendar_id = $calendar->id;
+                            $calendar_game->home_team_id = $type == 'ANDATA' ? $home_team_id : $away_team_id;
+                            $calendar_game->away_team_id = $type == 'ANDATA' ? $away_team_id : $home_team_id;
+                            $calendar_game->date = $date;
+                            $calendar_game->day = $day;
+                            $calendar_game->type = $type;
+                            $calendar_game->home_goals = null;
+                            $calendar_game->away_goals = null;
+                            $calendar_game->home_points = null;
+                            $calendar_game->away_points = null;
+                            $calendar_game->save();
+
+                        }
+
+                        if (substr($line, 0, 3) == '|--')
+                        {
+                            $insert = true;
+                        }
+
+                    }
+                }
+
+                fclose($handle);
+            }
+            else
+            {
+
+            }
+
+        }
+
+        $calendar->update($input);
+
+        return redirect()->route('calendars.index')
+                        ->with('success','Calendar updated successfully');
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Calendar  $calendar
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Calendar $calendar)
+    {
+
+        $aTeams = array();
+
+        $games = CalendarGame::where('calendar_id', '=', $calendar->id)->get();
+        foreach($games as $game)
+        {
+            $home_team_id = $game->home_team_id;
+            $away_team_id = $game->away_team_id;
+
+            if ($home_team_id != null)
+            {
+                if(!in_array($home_team_id, $aTeams, true))
+                {
+                    array_push($aTeams, $home_team_id);
+                }
+            }
+
+            if ($away_team_id != null)
+            {
+                if(!in_array($away_team_id, $aTeams, true))
+                {
+                    array_push($aTeams, $away_team_id);
+                }
+            }
+
+            $game->delete();
+
+        }
+
+        foreach($aTeams as $team_id)
+        {
+            $th = Team::where('id', '=', $team_id)->first();
+            if ($th != null)
+                $th->delete();
+        }
+
+        // CalendarGame::where('calendar_id', '=', $calendar->id)->delete();
+
+        $calendar->delete();
+
+        return redirect()->route('calendars.index')
+                        ->with('success','Calendar deleted successfully');
+    }
+
+}

+ 139 - 0
app/Http/Controllers/CategoryController.php

@@ -0,0 +1,139 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\Category;
+use Illuminate\Http\Request;
+use File;
+
+class CategoryController extends Controller
+{
+
+    protected $rules = [
+        'name' => ['required']
+    ];
+
+    public function index()
+    {
+        $categories = Category::orderBy('position')->get(); //->paginate(50);
+
+        return view('categories.index',compact('categories'))
+            ->with('i', (request()->input('page', 1) - 1) * 5);
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        return view('categories.create');
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        $request->validate($this->rules);
+
+        $input = $request->all();
+        $input["position"] = $input["position"] != '' ? $input["position"] : 0;
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/categories"))
+                File::makeDirectory(public_path()."/files/categories");
+
+            $path = public_path('files/categories');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        Category::create($input);
+
+        return redirect()->route('categories.index')
+                        ->with('success','Category created successfully.');
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Category  $category
+     * @return \Illuminate\Http\Response
+     */
+    public function show(Category $category)
+    {
+        return view('categories.show',compact('category'));
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Category  $category
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Category $category)
+    {
+        return view('categories.edit',compact('category'));
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Category  $category
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Category $category)
+    {
+        $request->validate($this->rules);
+
+        $input = $request->all();
+        $input["position"] = $input["position"] != '' ? $input["position"] : 0;
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/categories"))
+                File::makeDirectory(public_path()."/files/categories");
+
+            $path = public_path('files/categories');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        $category->update($input);
+
+        return redirect()->route('categories.index')
+                        ->with('success','Category updated successfully');
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Category  $category
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Category $category)
+    {
+
+        $category->delete();
+
+        return redirect()->route('categories.index')
+                        ->with('success','Category deleted successfully');
+    }
+}

+ 13 - 0
app/Http/Controllers/Controller.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
+use Illuminate\Foundation\Bus\DispatchesJobs;
+use Illuminate\Foundation\Validation\ValidatesRequests;
+use Illuminate\Routing\Controller as BaseController;
+
+class Controller extends BaseController
+{
+    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
+}

+ 194 - 0
app/Http/Controllers/EventAdvController.php

@@ -0,0 +1,194 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\Event;
+use App\EventAdv;
+use Illuminate\Http\Request;
+use File;
+  
+class EventAdvController extends Controller
+{
+    
+    protected $rules = [
+        // 'name' => ['required']
+    ];
+
+    public function index(Event $event)
+    {
+
+        $aDatas['Sopra 234x60 1'] = array();
+        $aDatas['Sopra 234x60 2'] = array();
+        $aDatas['Sopra 234x60 3'] = array();
+        $aDatas['Sopra 234x60 4'] = array();
+        $aDatas['Sotto 234x60 1'] = array();
+        $aDatas['Sotto 234x60 2'] = array();
+        $aDatas['Sotto 234x60 3'] = array();
+        $aDatas['Sotto 234x60 4'] = array();
+        $aDatas['728x90'] = array();
+
+        $events_advs = EventAdv::where('event_id', '=', $event->id)->orderBy('position')->get();
+        foreach($events_advs as $a)
+        {
+            $aDatas[$a->position][] = $a;
+        }
+        
+        return view('events_advs.index',compact('aDatas', 'event'));
+            // ->with('i', (request()->input('event', 1) - 1) * 5);
+    }
+   
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create(Event $event)
+    {
+        return view('events_advs.create', compact('event'));
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request, Event $event, EventAdv $event_adv)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["name"] = $input["name"] == null ? '' : $input["name"];
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+        $input["event_id"] = $event->id;
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/adv');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        if(request()->jingle)
+        {
+
+            $file = request()->jingle;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/news');
+
+            request()->jingle->move($path, $filename);
+
+            $input["jingle"] = $filename;
+
+        }
+
+        EventAdv::create($input);
+   
+        return redirect()->route('events.advs.index', compact('event'))
+                        ->with('success','Event created successfully.');
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Event  $event
+     * @return \Illuminate\Http\Response
+     */
+    public function show(EventAdv $event_adv, Event $event)
+    {
+        return view('events_advs.show',compact('event'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Event  $event
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Event $event, EventAdv $adv)
+    {
+        return view('events_advs.edit',compact('event', 'adv'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Event  $event
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Event $event, EventAdv $adv)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["name"] = $input["name"] == null ? '' : $input["name"];
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/adv');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        if(request()->jingle)
+        {
+
+            $file = request()->jingle;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/news');
+
+            request()->jingle->move($path, $filename);
+
+            $input["jingle"] = $filename;
+
+        }
+        
+        $adv->update($input);
+  
+        return redirect()->route('events.advs.index', compact('event'))
+                        ->with('success','Event adv updated successfully');
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Event  $event
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Event $event, EventAdv $event_adv)
+    {
+        
+        $event_adv->delete();
+  
+        return redirect()->route('events.advs.index', compact('event'))
+                        ->with('success','Event adv deleted successfully');
+    }
+}

+ 153 - 0
app/Http/Controllers/EventController.php

@@ -0,0 +1,153 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\Event;
+use App\News;
+use Illuminate\Http\Request;
+use File;
+  
+class EventController extends Controller
+{
+    
+    protected $rules = [
+        'title' => ['required']
+    ];
+
+    public function index()
+    {
+        $events = Event::orderBy('title')->get(); //->paginate(50);
+  
+        return view('events.index',compact('events'))
+            ->with('i', (request()->input('event', 1) - 1) * 5);
+    }
+   
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        return view('events.create');
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["online"] = true; //isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/events"))
+                File::makeDirectory(public_path()."/files/events");
+            
+            $path = public_path('files/events');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+
+        Event::create($input);
+   
+        return redirect()->route('events.index')
+                        ->with('success','Event created successfully.');
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Event  $event
+     * @return \Illuminate\Http\Response
+     */
+    public function show(Event $event)
+    {
+        return view('events.show',compact('event'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Event  $event
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Event $event)
+    {
+        return view('events.edit',compact('event'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Event  $event
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Event $event)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/events"))
+                File::makeDirectory(public_path()."/files/events");
+            
+            $path = public_path('files/events');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        
+        $event->update($input);
+  
+        return redirect()->route('events.index')
+                        ->with('success','Event updated successfully');
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Event  $event
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Event $event)
+    {
+
+        $event->advs()->delete();
+
+        $news = News::where('event_id', '=', $event->id)->get();
+        foreach($news as $n)
+        {
+            $n->event_id = null;
+            $n->save();
+        }
+
+        $event->delete();
+  
+        return redirect()->route('events.index')
+                        ->with('success','Event deleted successfully');
+    }
+}

+ 144 - 0
app/Http/Controllers/GroupController.php

@@ -0,0 +1,144 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\Category;
+use App\Group;
+use Illuminate\Http\Request;
+use File;
+
+class GroupController extends Controller
+{
+
+    protected $rules = [
+        // 'name' => ['required']
+    ];
+
+    public function index(Category $category)
+    {
+
+        $groups = Group::where('category_id', '=', $category->id)->orderBy('position')->get();
+        return view('groups.index',compact('groups', 'category'));
+
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create(Category $category)
+    {
+        return view('groups.create', compact('category'));
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request, Category $category, Group $group)
+    {
+        $request->validate($this->rules);
+
+        $input = $request->all();
+
+        $input["name"] = $input["name"] == null ? '' : $input["name"];
+        $input["category_id"] = $category->id;
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/categories"))
+                File::makeDirectory(public_path()."/files/categories");
+
+            $path = public_path('files/categories');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+
+        Group::create($input);
+
+        return redirect()->route('categories.groups.index', compact('category'))
+                        ->with('success','Category created successfully.');
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Category  $category
+     * @return \Illuminate\Http\Response
+     */
+    public function show(Group $group, Category $category)
+    {
+        return view('groups.show',compact('category'));
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Category  $category
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Category $category, Group $group)
+    {
+        return view('groups.edit',compact('category', 'group'));
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Category  $category
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Category $category, Group $group)
+    {
+        $request->validate($this->rules);
+
+        $input = $request->all();
+        $input["name"] = $input["name"] == null ? '' : $input["name"];
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/categories"))
+                File::makeDirectory(public_path()."/files/categories");
+
+            $path = public_path('files/categories');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+
+        $group->update($input);
+
+        return redirect()->route('categories.groups.index', compact('category'))
+                        ->with('success','Category group updated successfully');
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Category  $category
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Category $category, Group $group)
+    {
+        $group->delete();
+
+        return redirect()->route('categories.groups.index', compact('category'))
+                        ->with('success','Category group deleted successfully');
+    }
+}

+ 1154 - 0
app/Http/Controllers/NewsController.php

@@ -0,0 +1,1154 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\News;
+use App\Section;
+use App\Event;
+use App\Page;
+use App\Home;
+use Illuminate\Http\Request;
+use File;
+use Auth;
+use App\Notifications\FacebookPost;
+use App\Notifications\TwitterPost;
+class NewsController extends Controller
+{
+    
+    protected $rules = [
+        //'section_id' => ['required']
+        'title' => ['required'],
+        //'page_id' => ['required'],
+    ];
+
+    public function index(Request $request)
+    {
+
+        // Se stavo modificando una news metto a null il campo
+        if ($request->session()->has('current_news')) {
+            $news_id = session('current_news', 0);
+            if ($news_id > 0)
+            {
+                $n = News::where('id', '=', $news_id)->take(1000)->get();
+                if ($n->count() > 0)
+                {
+                    $n = $n->first();
+                    if ($n->user_id == Auth::user()->id)
+                    {
+                        $n->user_id = null;
+                        $n->save();
+                    }
+                }
+                $request->session()->forget('current_news');
+            }
+        }
+
+        $news = News::orderBy('date', 'DESC')->take(1000)->get();//->paginate(50);
+  
+        return view('news.index',compact('news'))
+            ->with('i', (request()->input('page', 1) - 1) * 5);
+    }
+   
+    public function load_json()
+    {
+        $start = $_GET["start"];
+        $end = 50;//$_GET["length"];
+        $total = News::count();
+        $filtered = $total;
+
+        $sort_by = '';
+        $sort = $_GET["order"][0]["column"];
+        switch ($sort) {
+            case '0':
+                $sort_by = 'date';
+                break;
+            case '2':
+                $sort_by = 'title';
+                break;
+            case '3':
+                $sort_by = 'name';
+                break;
+            case '4':
+                $sort_by = 'name';
+                break;
+            case '5':
+                $sort_by = 'name';
+                break;
+            case '6':
+                $sort_by = 'title';
+                break;
+            case '7':
+                $sort_by = 'online';
+                break;
+            case '8':
+                $sort_by = 'clicks';
+                break;
+            default:
+                $sort_by = 'date';
+                break;
+        }
+        $sort_by_dir = $_GET["order"][0]["dir"];
+
+
+        $search = $_GET["search"]["value"];
+        
+        if ($sort == '3')
+        {
+            $news = News::with(['section' => function ($query) use ($sort_by, $sort_by_dir) {
+                $query->orderBy($sort_by, $sort_by_dir);
+            }]);
+        }
+        else if ($sort == '4')
+        {
+            $news = News::with(['region_1' => function ($query) use ($sort_by, $sort_by_dir) {
+                $query->orderBy($sort_by, $sort_by_dir);
+            }]);
+        }
+        else if ($sort == '5')
+        {
+            $news = News::with(['region_2' => function ($query) use ($sort_by, $sort_by_dir) {
+                $query->orderBy($sort_by, $sort_by_dir);
+            }]);
+        }
+        else if ($sort == '6')
+        {
+            $news = News::with(['event' => function ($query) use ($sort_by, $sort_by_dir) {
+                $query->orderBy($sort_by, $sort_by_dir);
+            }]);
+        }
+        else
+            $news = News::orderBy($sort_by, $sort_by_dir);
+
+        if ($search != '')
+        {
+            $news = $news->where('title', 'LIKE', '%' . $search . '%');
+            $filtered = $news->count();
+        }
+
+        $news = $news->limit($end)->offset($start)->get();//->paginate(50);
+
+        $aData = array();
+        foreach($news as $n)
+        {
+            $x = array();
+            $x[] = $n->date;
+            if ($n->image != '')
+                $x[] = '<img src="/files/news/' . $n->image . '" style="max-width:100px" />';
+            else
+                $x[] = '';
+            $x[] = $n->title;
+            $section = @$n->section->name;
+            if($n->section)
+                $section .= '<br>' . isset($n->section) ? $n->section->position($n->id) : '';
+            $x[] = $section;
+            $region_1 = @$n->region_1->name;
+            if($n->region_1)
+                $region_1 .= '<br>' . isset($n->region_1) ? $n->region_1->position($n->id) : '';
+            $x[] = $region_1;
+            $region_2 = @$n->region_2->name;
+            if($n->region_2)
+                $region_2 .= '<br>' . isset($n->region_2) ? $n->region_2->position($n->id) : '';
+            $x[] = $region_2;
+            //$x[] = @$n->event->title;
+            $x[] = @$n->online ? '<a si class="btn btn-w-m btn-default" href="/admin/news/status/' . $n->id . '/offline">&nbsp;Si&nbsp;</a>' : '<a no class="btn btn-w-m btn-default" href="/admin/news/status/' . $n->id . '/online">No</a>';
+            $x[] = @$n->clicks;
+            $x[] = '<a href="/admin/news/duplicate/' . $n->id . '" type="button" class="btn btn-w-m btn-primary"><i class="fa fa-clone" aria-hidden="true"></i></a>';
+            $x[] = '<a href="/admin/news/' . $n->id . '/edit" type="button" class="btn btn-w-m btn-primary"><i class="fa fa-pencil" aria-hidden="true"></i></a>';
+            $form = '<form method="POST" action="/admin/news/' . $n->id . '" accept-charset="UTF-8" class="form-inline">
+                <input name="_method" type="hidden" value="DELETE">
+                <input name="_token" type="hidden" value="' . csrf_token() . '">
+                <button type="submit" class="btn btn-w-m btn-danger" onclick="return confirm(\'Sei sicuro?\')"><i class="fa fa-trash-o" aria-hidden="true"></i></button>
+            </form>';
+            $x[] = $form;
+            $aData[] = $x;            
+        }
+        $aRet = array('recordsTotal' => $total, 'recordsFiltered' => $filtered, 'data' => $aData);
+        return json_encode($aRet);
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+
+        $sections = Section::where('type', '=', 'section')->orderBy('position')->pluck('name', 'id')->toArray();;
+        $regions = Section::where('type', '=', 'region')->orderBy('name')->pluck('name', 'id')->toArray();;
+        $layouts = Section::pluck('layout', 'id')->toArray();
+        $events = Event::orderBy('title')->pluck('title', 'id')->toArray();;
+        $pages = Page::where('online', '=', true)->orderBy('title')->pluck('title', 'id')->toArray();;
+
+        $section_position = '';
+        $region_1_position = '';
+        $region_2_position = '';
+
+        $first = '';
+        $aFirst = array();
+        $home = Home::first();
+        if ($home != null)
+        {
+            $pos = '';
+            $home->loadData();
+            if (isset($home->slide1) && $home->slide1 != '')
+                $aFirst[] = $home->slide1->title . " (immagine grande)";
+            for($a=1;$a<=5;$a++)
+            {
+                if (isset($home["left" . $a]) && $home["left" . $a] != '')
+                    $aFirst[] = $home["left" . $a]["title"] . " (slide sinistra)";
+            }
+            for($a=1;$a<=5;$a++)
+            {
+                if (isset($home["right" . $a]) && $home["right" . $a] != '')
+                    $aFirst[] = $home["right" . $a]["title"] . " (slide destra)";
+            }
+            $first = '<li>' . implode("</li><li>", $aFirst) . '</li>';
+        }
+
+        return view('news.create', compact('sections', 'regions', 'events', 'pages', 'layouts', 'section_position', 'region_1_position', 'region_2_position', 'first'));
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        $request->validate($this->rules);
+
+        $input = $request->all();
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/news"))
+                File::makeDirectory(public_path()."/files/news");
+            
+            $path = public_path('files/news');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        else
+        {
+            if (isset($_POST["filename"]))
+                $input["image"] = $_POST["filename"];
+        }
+
+        for($i=1;$i<=5;$i++)
+        {
+            if(isset($input["image" . $i]))
+            {
+
+                $file = $input["image" . $i];
+                $filename  = time() . '_' . $file->getClientOriginalName();
+
+                if (! File::exists(public_path()."/files/news"))
+                    File::makeDirectory(public_path()."/files/news");
+                
+                $path = public_path('files/news');
+
+                $input["image" . $i]->move($path, $filename);
+
+                $input["image" . $i] = $filename;
+
+            }
+        }
+
+        if(request()->pdf)
+        {
+
+            $file = request()->pdf;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/news"))
+                File::makeDirectory(public_path()."/files/news");
+            
+            $path = public_path('files/news');
+
+            request()->pdf->move($path, $filename);
+
+            $input["pdf"] = $filename;
+
+        }
+
+        $final_date = null;
+        if ($input["date"] != '')
+        {
+            list($dt, $time) = explode(" ", $input["date"]);
+            list($day, $month, $year) = explode("/", $dt);
+            $final_date = $year . "-" . $month . "-" . $day . " " . $time;
+        }
+        $input["date"] = $final_date;
+
+        // $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+        $input["online"] = false;
+        $input["homepage"] = isset($input["homepage"]) ? ($input["homepage"] == 'on' ? true : false) : false;
+        $input["live"] = isset($input["live"]) ? ($input["live"] == 'on' ? true : false) : false;
+        $input["breaking_news"] = isset($input["breaking_news"]) ? ($input["breaking_news"] == 'on' ? true : false) : false;
+  
+        $news = News::create($input);
+
+        if (isset($input['publish']))
+        {
+            $news->online = true;
+            $news->save();
+            
+            // Posiziono la notizia se la data non è 
+            if ($final_date <= date("Y-m-d H:i:s"))
+            {
+
+                if ($_POST["section_position"] != '')
+                {
+                    $s = Section::findOrFail($input["section_id"]);
+                    $s[$_POST["section_position"]] = $news->id;
+                    $s->save();
+                    $news->section_position = '';
+                    
+                }
+                if ($_POST["region_1_position"] != '')
+                {
+                    $s = Section::findOrFail($input["region_1_id"]);
+                    $s[$_POST["region_1_position"]] = $news->id;
+                    $s->save();
+                    $news->region_1_position = '';
+                }
+                if ($_POST["region_2_position"] != '')
+                {
+                    $s = Section::findOrFail($input["region_2_id"]);
+                    $s[$_POST["region_2_position"]] = $news->id;
+                    $s->save();
+                    $news->region_2_position = '';
+                }
+
+            }
+            if (isset($input['no_social']))
+            {
+            }
+            else
+            {
+                @$news->notify(new FacebookPost());
+                $news->notify(new TwitterPost());
+                $news->published = true;
+                $news->save();
+            }
+
+        }
+        if (isset($input['unpublish']))
+        {
+            $news->online = false;
+            $news->save();
+        }
+
+        if ($_POST["homepage_position"] != '' && $news->online)
+        {
+            $home = Home::first();
+            if ($home != null)
+            {
+                $home->fill([
+                    $_POST["homepage_position"] => $news->id
+                ]);
+                $home->save();
+            }
+        }
+
+        /*
+        // Posizione
+        if ($_POST["section_position"] != '')
+        {
+            $field = $input["section_position"];
+            $s = Section::findOrFail($input["section_id"]);
+            $s->big = ($field != 'big' && $s->big == $news->id) ? '' : $s->big;
+            $s->small1 = ($field != 'small1' && $s->small1 == $news->id) ? '' : $s->small1;
+            $s->small2 = ($field != 'small2' && $s->small2 == $news->id) ? '' : $s->small2;
+            $s->small3 = ($field != 'small3' && $s->small3 == $news->id) ? '' : $s->small3;
+            $s->small4 = ($field != 'small4' && $s->small4 == $news->id) ? '' : $s->small4;
+            $s->small5 = ($field != 'small5' && $s->small5 == $news->id) ? '' : $s->small5;
+            $s->small6 = ($field != 'small6' && $s->small6 == $news->id) ? '' : $s->small6;
+            $s->$field = $news->id;
+            $s->save();
+
+            // CLEARLAYOUT
+            $s->clearLayout();
+
+        }
+        if ($_POST["region_1_position"] != '')
+        {
+            $field = $input["region_1_position"];
+            $r = Section::findOrFail($input["region_1_id"]);
+            $r->big = ($field != 'big' && $r->big == $news->id) ? '' : $r->big;
+            $r->small1 = ($field != 'small1' && $r->small1 == $news->id) ? '' : $r->small1;
+            $r->small2 = ($field != 'small2' && $r->small2 == $news->id) ? '' : $r->small2;
+            $r->small3 = ($field != 'small3' && $r->small3 == $news->id) ? '' : $r->small3;
+            $r->small4 = ($field != 'small4' && $r->small4 == $news->id) ? '' : $r->small4;
+            $r->small5 = ($field != 'small5' && $r->small5 == $news->id) ? '' : $r->small5;
+            $r->small6 = ($field != 'small6' && $r->small6 == $news->id) ? '' : $r->small6;
+            $r->$field = $news->id;
+            $r->save();
+            
+            // CLEARLAYOUT
+            $r->clearLayout();
+        }
+        if ($_POST["region_2_position"] != '')
+        {
+            $field = $input["region_2_position"];
+            $r = Section::findOrFail($input["region_2_id"]);
+            $r->big = ($field != 'big' && $r->big == $news->id) ? '' : $r->big;
+            $r->small1 = ($field != 'small1' && $r->small1 == $news->id) ? '' : $r->small1;
+            $r->small2 = ($field != 'small2' && $r->small2 == $news->id) ? '' : $r->small2;
+            $r->small3 = ($field != 'small3' && $r->small3 == $news->id) ? '' : $r->small3;
+            $r->small4 = ($field != 'small4' && $r->small4 == $news->id) ? '' : $r->small4;
+            $r->small5 = ($field != 'small5' && $r->small5 == $news->id) ? '' : $r->small5;
+            $r->small6 = ($field != 'small6' && $r->small6 == $news->id) ? '' : $r->small6;
+            $r->$field = $news->id;
+            $r->save();
+
+            // CLEARLAYOUT
+            $r->clearLayout();
+        }
+        */
+        if (isset($input['publish']))
+            return redirect()->route('news.index')->with('success','News updated successfully');
+
+        if (isset($input['unpublish']))
+            return redirect()->route('news.index')->with('success','News updated successfully');
+
+        if (isset($input['save']))
+        {
+            return redirect()->route('news.edit', $news->id)->with('success','News updated successfully');
+        }
+        if (isset($input['save_exit']))
+        {
+            return redirect()->route('news.index')->with('success','News updated successfully');
+        }
+   
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\News  $news
+     * @return \Illuminate\Http\Response
+     */
+    public function show(News $news)
+    {
+        return view('news.show',compact('news'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\News  $news
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(News $news)
+    {
+
+        // Aggiorno l'utente che sta guardando la news
+        if ($news->user_id == null)
+        {
+            session(['current_news' => $news->id]);
+            $news->user_id = Auth::user()->id;
+            $news->save();
+        }
+
+        $sections = Section::where('type', '=', 'section')->orderBy('position')->pluck('name', 'id')->toArray();;
+        $regions = Section::where('type', '=', 'region')->orderBy('name')->pluck('name', 'id')->toArray();;
+        $layouts = Section::pluck('layout', 'id')->toArray();
+        $events = Event::orderBy('title')->pluck('title', 'id')->toArray();;
+        $pages = Page::where('online', '=', true)->orderBy('title')->pluck('title', 'id')->toArray();;
+        $final_date = null;
+        if ($news->date != null)
+        {
+            list($dt, $time) = explode(" ", $news->date);
+            list($year, $month, $day) = explode("-", $dt);
+            $final_date = $day . "/" . $month . "/" . $year . " " . $time;
+        }
+        /*
+        $section_position = '';
+        if ($news->section_id > 0)
+        {
+            if ($news->section->big == $news->id)
+                $section_position = 'big';
+            if ($news->section->small1 == $news->id)
+                $section_position = 'small1';
+            if ($news->section->small2 == $news->id)
+                $section_position = 'small2';
+            if ($news->section->small3 == $news->id)
+                $section_position = 'small3';
+            if ($news->section->small4 == $news->id)
+                $section_position = 'small4';
+            if ($news->section->small5 == $news->id)
+                $section_position = 'small5';
+            if ($news->section->small6 == $news->id)
+                $section_position = 'small6';
+            
+            if ($section_position == null)
+                $section_position = $news->section_position;
+
+
+        }
+        $region_1_position = '';
+        if ($news->region_1_id > 0)
+        {
+            if ($news->region_1->big == $news->id)
+                $region_1_position = 'big';
+            if ($news->region_1->small1 == $news->id)
+                $region_1_position = 'small1';
+            if ($news->region_1->small2 == $news->id)
+                $region_1_position = 'small2';
+            if ($news->region_1->small3 == $news->id)
+                $region_1_position = 'small3';
+            if ($news->region_1->small4 == $news->id)
+                $region_1_position = 'small4';
+            if ($news->region_1->small5 == $news->id)
+                $region_1_position = 'small5';
+            if ($news->region_1->small6 == $news->id)
+                $region_1_position = 'small6';
+
+            if ($region_1_position == '')
+                $region_1_position = $news->region_1_position;
+
+        }
+        $region_2_position = '';
+        if ($news->region_2_id > 0)
+        {
+            if ($news->region_2->big == $news->id)
+                $region_2_position = 'big';
+            if ($news->region_2->small1 == $news->id)
+                $region_2_position = 'small1';
+            if ($news->region_2->small2 == $news->id)
+                $region_2_position = 'small2';
+            if ($news->region_2->small3 == $news->id)
+                $region_2_position = 'small3';
+            if ($news->region_2->small4 == $news->id)
+                $region_2_position = 'small4';
+            if ($news->region_2->small5 == $news->id)
+                $region_2_position = 'small5';
+            if ($news->region_2->small6 == $news->id)
+                $region_2_position = 'small6';
+
+            if ($region_2_position == '')
+                $region_2_position = $news->region_2_position;
+
+        }
+        */
+        $section_position = $news->section_position;
+        $region_1_position = $news->region_1_position;
+        $region_2_position = $news->region_2_position;
+        $first = '';
+        $aFirst = array();
+        $home = Home::first();
+        if ($home != null)
+        {
+            $pos = '';
+            if ($home->slide1 == $news->id)
+                $news->homepage_position = "slide1";
+            if ($home->left1 == $news->id)
+                $news->homepage_position = "left1";
+            if ($home->left2 == $news->id)
+                $news->homepage_position = "left2";
+            if ($home->left3 == $news->id)
+                $news->homepage_position = "left3";
+            if ($home->right1 == $news->id)
+                $news->homepage_position = "right1";
+            if ($home->right2 == $news->id)
+                $news->homepage_position = "right2";
+            if ($home->right3 == $news->id)
+                $news->homepage_position = "right3";
+            $home->loadData();
+            if (isset($home->slide1) && $home->slide1 != '')
+                $aFirst[] = $home->slide1->title . " (immagine grande)";
+            for($a=1;$a<=5;$a++)
+            {
+                if (isset($home["left" . $a]) && $home["left" . $a] != '')
+                    $aFirst[] = $home["left" . $a]["title"] . " (slide sinistra)";
+                
+            }
+            for($a=1;$a<=5;$a++)
+            {
+                if (isset($home["right" . $a]) && $home["right" . $a] != '')
+                    $aFirst[] = $home["right" . $a]["title"] . " (slide destra)";
+            }
+            $first = '<li>' . implode("</li><li>", $aFirst) . '</li>';
+        }
+
+        
+        $news->date = $final_date;
+
+        return view('news.edit',compact('news', 'sections', 'regions', 'pages', 'events', 'layouts', 'section_position', 'region_1_position', 'region_2_position', 'first'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\News  $news
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, News $news)
+    {
+        $request->validate($this->rules);
+
+        $input = $request->all();
+
+
+        $old_section_id = $news->section_id;
+        $old_region_1_id = $news->region_1_id;
+        $old_region_2_id = $news->region_2_id;
+        $old_event_id = $news->event_id;
+
+        $section_position = '';
+        if ($news->section_id > 0)
+        {
+            if ($news->section->big == $news->id)
+                $section_position = 'big';
+            /*if ($news->section->medium1 == $news->id)
+                $section_position = 'medium1';
+            if ($news->section->medium2 == $news->id)
+                $section_position = 'medium2';
+            if ($news->section->medium3 == $news->id)
+                $section_position = 'medium3';*/
+            if ($news->section->small1 == $news->id)
+                $section_position = 'small1';
+            if ($news->section->small2 == $news->id)
+                $section_position = 'small2';
+            if ($news->section->small3 == $news->id)
+                $section_position = 'small3';
+            if ($news->section->small4 == $news->id)
+                $section_position = 'small4';
+            if ($news->section->small5 == $news->id)
+                $section_position = 'small5';
+            if ($news->section->small6 == $news->id)
+                $section_position = 'small6';
+            
+            if ($section_position == null)
+                $section_position = $news->section_position;
+
+
+        }
+        $region_1_position = '';
+        if ($news->region_1_id > 0)
+        {
+            if ($news->region_1->big == $news->id)
+                $region_1_position = 'big';
+            /*if ($news->region_1->medium1 == $news->id)
+                $region_1_position = 'medium1';
+            if ($news->region_1->medium2 == $news->id)
+                $region_1_position = 'medium2';
+            if ($news->region_1->medium3 == $news->id)
+                $region_1_position = 'medium3';*/
+            if ($news->region_1->small1 == $news->id)
+                $region_1_position = 'small1';
+            if ($news->region_1->small2 == $news->id)
+                $region_1_position = 'small2';
+            if ($news->region_1->small3 == $news->id)
+                $region_1_position = 'small3';
+            if ($news->region_1->small4 == $news->id)
+                $region_1_position = 'small4';
+            if ($news->region_1->small5 == $news->id)
+                $region_1_position = 'small5';
+            if ($news->region_1->small6 == $news->id)
+                $region_1_position = 'small6';
+
+            if ($region_1_position == '')
+                $region_1_position = $news->region_1_position;
+
+        }
+        $region_2_position = '';
+        if ($news->region_2_id > 0)
+        {
+            if ($news->region_2->big == $news->id)
+                $region_2_position = 'big';
+            /*if ($news->region_2->medium1 == $news->id)
+                $region_2_position = 'medium1';
+            if ($news->region_2->medium2 == $news->id)
+                $region_2_position = 'medium2';
+            if ($news->region_2->medium3 == $news->id)
+                $region_2_position = 'medium3';*/
+            if ($news->region_2->small1 == $news->id)
+                $region_2_position = 'small1';
+            if ($news->region_2->small2 == $news->id)
+                $region_2_position = 'small2';
+            if ($news->region_2->small3 == $news->id)
+                $region_2_position = 'small3';
+            if ($news->region_2->small4 == $news->id)
+                $region_2_position = 'small4';
+            if ($news->region_2->small5 == $news->id)
+                $region_2_position = 'small5';
+            if ($news->region_2->small6 == $news->id)
+                $region_2_position = 'small6';
+
+            if ($region_2_position == '')
+                $region_2_position = $news->region_2_position;
+
+        }
+
+        if ($old_section_id == $input["section_id"] && $section_position == $input["section_position"])
+            unset($input["section_position"]);
+        
+        if ($old_region_1_id == $input["region_1_id"] && $region_1_position == $input["region_1_position"])
+            unset($input["region_1_position"]);
+
+        if ($old_region_2_id == $input["region_2_id"] && $region_2_position == $input["region_2_position"])
+            unset($input["region_2_position"]);
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/news"))
+                File::makeDirectory(public_path()."/files/news");
+            
+            $path = public_path('files/news');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        for($i=1;$i<=5;$i++)
+        {
+            if(isset($input["image" . $i]))
+            {
+
+                $file = $input["image" . $i];
+                $filename  = time() . '_' . $file->getClientOriginalName();
+
+                if (! File::exists(public_path()."/files/news"))
+                    File::makeDirectory(public_path()."/files/news");
+                
+                $path = public_path('files/news');
+
+                $input["image" . $i]->move($path, $filename);
+
+                $input["image" . $i] = $filename;
+
+            }
+        }
+
+        if (isset($input["remove_pdf"]))
+        {
+            $input["pdf"] = '';
+        }
+        if(request()->pdf)
+        {
+
+            $file = request()->pdf;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/news"))
+                File::makeDirectory(public_path()."/files/news");
+            
+            $path = public_path('files/news');
+
+            request()->pdf->move($path, $filename);
+
+            $input["pdf"] = $filename;
+
+        }
+
+        $final_date = null;
+        if ($input["date"] != '')
+        {
+            list($dt, $time) = explode(" ", $input["date"]);
+            list($day, $month, $year) = explode("/", $dt);
+            $final_date = $year . "-" . $month . "-" . $day . " " . $time;
+        }
+        $input["date"] = $final_date;
+
+        // $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+        $input["homepage"] = isset($input["homepage"]) ? ($input["homepage"] == 'on' ? true : false) : false;
+        $input["live"] = isset($input["live"]) ? ($input["live"] == 'on' ? true : false) : false;
+        $input["breaking_news"] = isset($input["breaking_news"]) ? ($input["breaking_news"] == 'on' ? true : false) : false;
+        
+        $news->update($input);
+
+        $news->user_id = null;
+        $news->save();
+        $request->session()->forget('current_news');
+
+        if (isset($input['publish']))
+        {
+            
+            $news->online = true;
+            $news->save();
+
+            if (isset($input['no_social']))
+            {
+                // Non pubblico sui social
+            }
+            else
+            {
+                @$news->notify(new FacebookPost());
+                $news->notify(new TwitterPost());
+                $news->published = true;
+                $news->save();
+            }
+            
+        }
+        if (isset($input['unpublish']))
+        {
+            $news->online = false;
+            $news->save();
+        }
+
+        if ($_POST["homepage_position"] != '' && $news->online)
+        {
+            $home = Home::first();
+            if ($home != null)
+            {
+                $home->fill([
+                    $_POST["homepage_position"] => $news->id
+                ]);                
+                $home->save();
+            }
+        }
+        
+        if ($news->event_id != $old_event_id)
+        {
+            $e = Event::where('id', '=', $old_event_id)->first();
+            if ($e)
+            {
+                if ($e->big == $news->id)
+                    $e->big = '';
+                if ($e->small1 == $news->id)
+                    $e->small1 = '';
+                if ($e->small2 == $news->id)
+                    $e->small2 = '';
+                if ($e->small3 == $news->id)
+                    $e->small3 = '';
+                if ($e->small4 == $news->id)
+                    $e->small4 = '';
+                $e->save();
+            }
+        }
+
+        /*
+        // Posizione
+        if ($_POST["section_position"] != '')
+        {
+
+            if ($input["section_id"] == '')
+            {
+                if ($old_section_id > 0)
+                {
+                    $s_old = Section::findOrFail($old_section_id);
+                    $s_old->big = ($s_old->big == $news->id) ? '' : $s_old->big;
+                    $s_old->small1 = ($s_old->small1 == $news->id) ? '' : $s_old->small1;
+                    $s_old->small2 = ($s_old->small2 == $news->id) ? '' : $s_old->small2;
+                    $s_old->small3 = ($s_old->small3 == $news->id) ? '' : $s_old->small3;
+                    $s_old->small4 = ($s_old->small4 == $news->id) ? '' : $s_old->small4;
+                    $s_old->small5 = ($s_old->small5 == $news->id) ? '' : $s_old->small5;
+                    $s_old->small6 = ($s_old->small6 == $news->id) ? '' : $s_old->small6;
+                    $s_old->save();
+                    // CLEARLAYOUT
+                    $s_old->clearLayout();
+                }
+            }
+            else
+            {
+
+                // Se online e data > adesso
+                if ($news->online && $news->data < date("Y-m-d H:i:s"))
+                {
+
+                    $field = $input["section_position"];
+                    $s = Section::findOrFail($input["section_id"]);
+
+                    // Se ho cambiato sezione, tolgo dalla vecchia me metto nella nuova
+                    if ($input["section_id"] != $old_section_id)
+                    {
+                        if ($old_section_id > 0)
+                        {
+                            $s_old = Section::findOrFail($old_section_id);
+                            $s_old->big = ($s_old->big == $news->id) ? '' : $s_old->big;
+                            $s_old->small1 = ($s_old->small1 == $news->id) ? '' : $s_old->small1;
+                            $s_old->small2 = ($s_old->small2 == $news->id) ? '' : $s_old->small2;
+                            $s_old->small3 = ($s_old->small3 == $news->id) ? '' : $s_old->small3;
+                            $s_old->small4 = ($s_old->small4 == $news->id) ? '' : $s_old->small4;
+                            $s_old->small5 = ($s_old->small5 == $news->id) ? '' : $s_old->small5;
+                            $s_old->small6 = ($s_old->small6 == $news->id) ? '' : $s_old->small6;
+                            $s_old->save();
+                            // CLEARLAYOUT
+                            $s_old->clearLayout();
+                        }
+                    }
+                    else
+                    {
+                        $s->big = ($field != 'big' && $s->big == $news->id) ? '' : $s->big;
+                        $s->small1 = ($field != 'small1' && $s->small1 == $news->id) ? '' : $s->small1;
+                        $s->small2 = ($field != 'small2' && $s->small2 == $news->id) ? '' : $s->small2;
+                        $s->small3 = ($field != 'small3' && $s->small3 == $news->id) ? '' : $s->small3;
+                        $s->small4 = ($field != 'small4' && $s->small4 == $news->id) ? '' : $s->small4;
+                        $s->small5 = ($field != 'small5' && $s->small5 == $news->id) ? '' : $s->small5;
+                        $s->small6 = ($field != 'small6' && $s->small6 == $news->id) ? '' : $s->small6;               
+                    }
+                    $s->$field = $news->id;
+                    $s->save();
+                    
+                    // CLEARLAYOUT
+                    $s->clearLayout();
+            
+                }
+
+            }
+
+        }
+        else
+        {
+            
+            if ($input["section_id"] == '')
+            {
+                if ($old_section_id > 0)
+                {
+                    $s_old = Section::findOrFail($old_section_id);
+                    $s_old->big = ($s_old->big == $news->id) ? '' : $s_old->big;
+                    $s_old->small1 = ($s_old->small1 == $news->id) ? '' : $s_old->small1;
+                    $s_old->small2 = ($s_old->small2 == $news->id) ? '' : $s_old->small2;
+                    $s_old->small3 = ($s_old->small3 == $news->id) ? '' : $s_old->small3;
+                    $s_old->small4 = ($s_old->small4 == $news->id) ? '' : $s_old->small4;
+                    $s_old->small5 = ($s_old->small5 == $news->id) ? '' : $s_old->small5;
+                    $s_old->small6 = ($s_old->small6 == $news->id) ? '' : $s_old->small6;
+                    $s_old->save();
+                    // CLEARLAYOUT
+                    $s_old->clearLayout();
+                }
+            }
+            else
+            {
+                if ($input["section_id"] != $old_section_id)
+                {
+                    $s_old = Section::findOrFail($old_section_id);
+                    $s_old->big = ($s_old->big == $news->id) ? '' : $s_old->big;
+                    $s_old->small1 = ($s_old->small1 == $news->id) ? '' : $s_old->small1;
+                    $s_old->small2 = ($s_old->small2 == $news->id) ? '' : $s_old->small2;
+                    $s_old->small3 = ($s_old->small3 == $news->id) ? '' : $s_old->small3;
+                    $s_old->small4 = ($s_old->small4 == $news->id) ? '' : $s_old->small4;
+                    $s_old->small5 = ($s_old->small5 == $news->id) ? '' : $s_old->small5;
+                    $s_old->small6 = ($s_old->small6 == $news->id) ? '' : $s_old->small6;
+                    $s_old->save();
+                    // CLEARLAYOUT
+                    $s_old->clearLayout();
+                }   
+                else
+                {
+                    
+                    $s_old = Section::findOrFail($input["section_id"]);
+                    $s_old->big = ($s_old->big == $news->id) ? '' : $s_old->big;
+                    $s_old->small1 = ($s_old->small1 == $news->id) ? '' : $s_old->small1;
+                    $s_old->small2 = ($s_old->small2 == $news->id) ? '' : $s_old->small2;
+                    $s_old->small3 = ($s_old->small3 == $news->id) ? '' : $s_old->small3;
+                    $s_old->small4 = ($s_old->small4 == $news->id) ? '' : $s_old->small4;
+                    $s_old->small5 = ($s_old->small5 == $news->id) ? '' : $s_old->small5;
+                    $s_old->small6 = ($s_old->small6 == $news->id) ? '' : $s_old->small6;
+                    print $s_old->small3;
+                    $s_old->save();
+                    // CLEARLAYOUT
+                    $s_old->clearLayout();
+                } 
+            }
+
+        }
+        if ($_POST["region_1_position"] != '')
+        {
+
+            if ($input["region_1_id"] == '')
+            {
+
+                if ($old_region_1_id > 0)
+                {
+                    $s_old = Section::findOrFail($old_region_1_id);
+                    $s_old->big = ($s_old->big == $news->id) ? '' : $s_old->big;
+                    $s_old->small1 = ($s_old->small1 == $news->id) ? '' : $s_old->small1;
+                    $s_old->small2 = ($s_old->small2 == $news->id) ? '' : $s_old->small2;
+                    $s_old->small3 = ($s_old->small3 == $news->id) ? '' : $s_old->small3;
+                    $s_old->small4 = ($s_old->small4 == $news->id) ? '' : $s_old->small4;
+                    $s_old->small5 = ($s_old->small5 == $news->id) ? '' : $s_old->small5;
+                    $s_old->small6 = ($s_old->small6 == $news->id) ? '' : $s_old->small6;
+                    $s_old->save();
+                    // CLEARLAYOUT
+                    $s_old->clearLayout();
+                }
+
+            }
+            else
+            {
+
+                $field = $input["region_1_position"];
+                $r = Section::findOrFail($input["region_1_id"]);
+                // Se ho cambiato sezione, tolgo dalla vecchia me metto nella nuova
+                if ($input["region_1_id"] != $old_region_1_id)
+                {
+                    if ($old_region_1_id > 0)
+                    {
+                        $s_old = Section::findOrFail($old_region_1_id);
+                        $s_old->big = ($s_old->big == $news->id) ? '' : $s_old->big;
+                        $s_old->small1 = ($s_old->small1 == $news->id) ? '' : $s_old->small1;
+                        $s_old->small2 = ($s_old->small2 == $news->id) ? '' : $s_old->small2;
+                        $s_old->small3 = ($s_old->small3 == $news->id) ? '' : $s_old->small3;
+                        $s_old->small4 = ($s_old->small4 == $news->id) ? '' : $s_old->small4;
+                        $s_old->small5 = ($s_old->small5 == $news->id) ? '' : $s_old->small5;
+                        $s_old->small6 = ($s_old->small6 == $news->id) ? '' : $s_old->small6;
+                        $s_old->save();
+                        // CLEARLAYOUT
+                        $s_old->clearLayout();
+                    }
+                }
+                else
+                {
+                    $r->big = ($field != 'big' && $r->big == $news->id) ? '' : $r->big;
+                    $r->small1 = ($field != 'small1' && $r->small1 == $news->id) ? '' : $r->small1;
+                    $r->small2 = ($field != 'small2' && $r->small2 == $news->id) ? '' : $r->small2;
+                    $r->small3 = ($field != 'small3' && $r->small3 == $news->id) ? '' : $r->small3;
+                    $r->small4 = ($field != 'small4' && $r->small4 == $news->id) ? '' : $r->small4;
+                    $r->small5 = ($field != 'small5' && $r->small5 == $news->id) ? '' : $r->small5;
+                    $r->small6 = ($field != 'small6' && $r->small6 == $news->id) ? '' : $r->small6;
+                }
+                $r->$field = $news->id;
+                $r->save();
+                // CLEARLAYOUT
+                $r->clearLayout();
+            }
+        }
+        if ($_POST["region_2_position"] != '')
+        {
+
+            if ($input["region_2_id"] == '')
+            {
+                if ($old_region_2_id > 0)
+                {
+                    $s_old = Section::findOrFail($old_region_2_id);
+                    $s_old->big = ($s_old->big == $news->id) ? '' : $s_old->big;
+                    $s_old->small1 = ($s_old->small1 == $news->id) ? '' : $s_old->small1;
+                    $s_old->small2 = ($s_old->small2 == $news->id) ? '' : $s_old->small2;
+                    $s_old->small3 = ($s_old->small3 == $news->id) ? '' : $s_old->small3;
+                    $s_old->small4 = ($s_old->small4 == $news->id) ? '' : $s_old->small4;
+                    $s_old->small5 = ($s_old->small5 == $news->id) ? '' : $s_old->small5;
+                    $s_old->small6 = ($s_old->small6 == $news->id) ? '' : $s_old->small6;
+                    $s_old->save();
+                    // CLEARLAYOUT
+                    $s_old->clearLayout();
+                }
+            }
+            else
+            {
+
+                $field = $input["region_2_position"];
+                $r = Section::findOrFail($input["region_2_id"]);
+                // Se ho cambiato sezione, tolgo dalla vecchia me metto nella nuova
+                if ($input["region_2_id"] != $old_region_2_id)
+                {
+                    if ($old_region_2_id > 0)
+                    {
+                        $s_old = Section::findOrFail($old_region_2_id);
+                        $s_old->big = ($s_old->big == $news->id) ? '' : $s_old->big;
+                        $s_old->small1 = ($s_old->small1 == $news->id) ? '' : $s_old->small1;
+                        $s_old->small2 = ($s_old->small2 == $news->id) ? '' : $s_old->small2;
+                        $s_old->small3 = ($s_old->small3 == $news->id) ? '' : $s_old->small3;
+                        $s_old->small4 = ($s_old->small4 == $news->id) ? '' : $s_old->small4;
+                        $s_old->small5 = ($s_old->small5 == $news->id) ? '' : $s_old->small5;
+                        $s_old->small6 = ($s_old->small6 == $news->id) ? '' : $s_old->small6;
+                        $s_old->save();
+                        // CLEARLAYOUT
+                        $s_old->clearLayout();
+                    }
+                }
+                else
+                {
+                    $r->big = ($field != 'big' && $r->big == $news->id) ? '' : $r->big;
+                    $r->small1 = ($field != 'small1' && $r->small1 == $news->id) ? '' : $r->small1;
+                    $r->small2 = ($field != 'small2' && $r->small2 == $news->id) ? '' : $r->small2;
+                    $r->small3 = ($field != 'small3' && $r->small3 == $news->id) ? '' : $r->small3;
+                    $r->small4 = ($field != 'small4' && $r->small4 == $news->id) ? '' : $r->small4;
+                    $r->small5 = ($field != 'small5' && $r->small5 == $news->id) ? '' : $r->small5;
+                    $r->small6 = ($field != 'small6' && $r->small6 == $news->id) ? '' : $r->small6;
+                }
+                $r->$field = $news->id;
+                $r->save();
+                // CLEARLAYOUT
+                $r->clearLayout();
+            }
+        }
+        */
+        if (isset($input['publish']))
+        {
+            
+            return redirect()->route('news.index')->with('success','News updated successfully');
+        }
+        if (isset($input['crop']))
+        {
+            return redirect('/admin/news/crop?news_id=' . $news->id);
+            // return redirect()->route('news.crop')->with('success','News updated successfully');
+        }
+        if (isset($input['unpublish']))
+        {
+            return redirect()->route('news.index')->with('success','News updated successfully');
+        }
+        if (isset($input['save']))
+        {
+            return redirect()->route('news.edit', $news->id)->with('success','News updated successfully');
+        }
+        if (isset($input['save_exit']))
+        {
+            return redirect()->route('news.index')->with('success','News updated successfully');
+        }
+
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\News  $news
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(News $news)
+    {
+        $section = null;
+        if (isset($news->section))
+        {
+            $section = $news->section;            
+        }
+        $region_1 = null;
+        if (isset($news->region_1))
+        {
+            $region_1 = $news->region_1;            
+        }
+        $region_2 = null;
+        if (isset($news->region_2))
+        {
+            $region_2 = $news->region_2;            
+        }
+
+        $news->delete();
+
+        /*if ($section != null)
+        {
+            // CLEARLAYOUT
+            $section->clearLayout();
+        }
+        if ($region_1 != null)
+        {
+            // CLEARLAYOUT
+            $region_1->clearLayout();
+        }
+        if ($region_2 != null)
+        {
+            // CLEARLAYOUT
+            $region_2->clearLayout();
+        }*/
+  
+        return redirect()->route('news.index')
+                        ->with('success','News deleted successfully');
+    }
+}

+ 194 - 0
app/Http/Controllers/PageAdvController.php

@@ -0,0 +1,194 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\Page;
+use App\PageAdv;
+use Illuminate\Http\Request;
+use File;
+  
+class PageAdvController extends Controller
+{
+    
+    protected $rules = [
+        // 'name' => ['required']
+    ];
+
+    public function index(Page $page)
+    {
+
+        $aDatas['728x90'] = array();
+        $aDatas['Sopra 234x60 1'] = array();
+        $aDatas['Sopra 234x60 2'] = array();
+        $aDatas['Sopra 234x60 3'] = array();
+        $aDatas['Sopra 234x60 4'] = array();
+        $aDatas['Sotto 234x60 1'] = array();
+        $aDatas['Sotto 234x60 2'] = array();
+        $aDatas['Sotto 234x60 3'] = array();
+        $aDatas['Sotto 234x60 4'] = array();
+        
+
+        $pages_advs = PageAdv::where('page_id', '=', $page->id)->orderBy('position')->orderBy('sort')->get();
+        foreach($pages_advs as $a)
+        {
+            $aDatas[$a->position][] = $a;
+        }
+        
+        return view('pages_advs.index',compact('aDatas', 'page'));
+            // ->with('i', (request()->input('page', 1) - 1) * 5);
+    }
+   
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create(Page $page)
+    {
+        return view('pages_advs.create', compact('page'));
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request, Page $page, PageAdv $page_adv)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["name"] = $input["name"] == null ? '' : $input["name"];
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+        $input["page_id"] = $page->id;
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/adv');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        if(request()->jingle)
+        {
+
+            $file = request()->jingle;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/news');
+
+            request()->jingle->move($path, $filename);
+
+            $input["jingle"] = $filename;
+
+        }
+
+        PageAdv::create($input);
+   
+        return redirect()->route('pages.advs.index', compact('page'))
+                        ->with('success','Page created successfully.');
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Page  $page
+     * @return \Illuminate\Http\Response
+     */
+    public function show(PageAdv $page_adv, Page $page)
+    {
+        return view('pages_advs.show',compact('page'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Page  $page
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Page $page, PageAdv $adv)
+    {
+        return view('pages_advs.edit',compact('page', 'adv'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Page  $page
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Page $page, PageAdv $adv)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["name"] = $input["name"] == null ? '' : $input["name"];
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/adv');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        if(request()->jingle)
+        {
+
+            $file = request()->jingle;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/news');
+
+            request()->jingle->move($path, $filename);
+
+            $input["jingle"] = $filename;
+
+        }
+        
+        $adv->update($input);
+  
+        return redirect()->route('pages.advs.index', compact('page'))
+                        ->with('success','Page adv updated successfully');
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Page  $page
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Page $page, PageAdv $adv)
+    {
+        $adv->delete();
+  
+        return redirect()->route('pages.advs.index', compact('page'))
+                        ->with('success','Page adv deleted successfully');
+    }
+}

+ 159 - 0
app/Http/Controllers/PageController.php

@@ -0,0 +1,159 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\Page;
+use App\PageAdv;
+use App\News;
+use Illuminate\Http\Request;
+use File;
+  
+class PageController extends Controller
+{
+    
+    protected $rules = [
+        'title' => ['required']
+    ];
+
+    public function index()
+    {
+        $pages = Page::orderBy('title')->get(); //->paginate(50);
+  
+        return view('pages.index',compact('pages'))
+            ->with('i', (request()->input('page', 1) - 1) * 5);
+    }
+   
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        return view('pages.create');
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/pages"))
+                File::makeDirectory(public_path()."/files/pages");
+            
+            $path = public_path('files/pages');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+
+        Page::create($input);
+   
+        return redirect()->route('pages.index')
+                        ->with('success','Page created successfully.');
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Page  $page
+     * @return \Illuminate\Http\Response
+     */
+    public function show(Page $page)
+    {
+        return view('pages.show',compact('page'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Page  $page
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Page $page)
+    {
+        return view('pages.edit',compact('page'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Page  $page
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Page $page)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/pages"))
+                File::makeDirectory(public_path()."/files/pages");
+            
+            $path = public_path('files/pages');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        
+        $page->update($input);
+  
+        return redirect()->route('pages.index')
+                        ->with('success','Page updated successfully');
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Page  $page
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Page $page)
+    {
+        
+        $news = News::where('page_id', '=', $page->id)->get();
+        foreach($news as $n)
+        {
+            $n->page_id = null;
+            $n->save();
+        }
+        
+        $advs = PageAdv::where('page_id', '=', $page->id)->get();
+        foreach($advs as $adv)
+        {
+            $adv->page_id = null;
+            $adv->save();
+        }
+        
+        $page->delete();
+  
+        return redirect()->route('pages.index')
+                        ->with('success','Page deleted successfully');
+    }
+}

+ 107 - 0
app/Http/Controllers/SeasonController.php

@@ -0,0 +1,107 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\Season;
+use Illuminate\Http\Request;
+  
+class SeasonController extends Controller
+{
+    
+    protected $rules = [
+        'name' => ['required']
+    ];
+
+    public function index()
+    {
+        $seasons = Season::orderBy('name')->get(); //->paginate(50);
+  
+        return view('seasons.index',compact('seasons'))
+            ->with('i', (request()->input('page', 1) - 1) * 5);
+    }
+   
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        return view('seasons.create');
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+
+        $input["default"] = isset($input["default"]) ? ($input["default"] == 'on' ? true : false) : false;
+
+        Season::create($input);
+   
+        return redirect()->route('seasons.index')
+                        ->with('success','Season created successfully.');
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Season  $season
+     * @return \Illuminate\Http\Response
+     */
+    public function show(Season $season)
+    {
+        return view('seasons.show',compact('season'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Season  $season
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Season $season)
+    {
+        return view('seasons.edit',compact('season'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Season  $season
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Season $season)
+    {
+        $request->validate($this->rules);
+
+        $input = $request->all();
+        $input["default"] = isset($input["default"]) ? ($input["default"] == 'on' ? true : false) : false;
+        $season->update($input);
+  
+        return redirect()->route('seasons.index')
+                        ->with('success','Season updated successfully');
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Season  $season
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Season $season)
+    {
+        $season->delete();
+  
+        return redirect()->route('seasons.index')
+                        ->with('success','Season deleted successfully');
+    }
+}

+ 233 - 0
app/Http/Controllers/SectionAdvController.php

@@ -0,0 +1,233 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\Section;
+use App\SectionAdv;
+use Illuminate\Http\Request;
+use File;
+  
+class SectionAdvController extends Controller
+{
+    
+    protected $rules = [
+        // 'name' => ['required']
+    ];
+
+    public function index(Section $section)
+    {
+
+        if ($section->layout == 'layout_1')
+        {
+            $aDatas['300x75'] = array();
+            $aDatas['300x75 Sotto'] = array();
+            $aDatas['300x600'] = array();                        
+        }
+        if ($section->layout == 'layout_2')
+        {
+            $aDatas['300x600'] = array();
+            $aDatas['300x75'] = array();      
+            $aDatas['300x75 Sotto'] = array();      
+        }
+        if ($section->layout == 'layout_3')
+        {
+            $aDatas['300x600'] = array();
+            $aDatas['300x250'] = array();
+        }
+        if ($section->layout == 'layout_4')
+        {
+            $aDatas['300x250 Sopra'] = array();
+            $aDatas['300x250 Centro'] = array();
+            $aDatas['300x250 Sotto'] = array();        
+            $aDatas['300x250 Quarto'] = array();        
+            // $aDatas['300x75'] = array(); 
+        }
+        if ($section->layout == 'layout_5')
+        {
+            $aDatas['300x75'] = array(); 
+            $aDatas['300x250 Sopra'] = array();
+            $aDatas['300x250 Centro'] = array();
+            $aDatas['300x250 Sotto'] = array();            
+        }
+        if ($section->layout == 'layout_6')
+        {
+            $aDatas['300x250'] = array();            
+            $aDatas['300x250 Sotto'] = array();            
+            // $aDatas['300x75'] = array();            
+        }
+        if ($section->layout == 'layout_7')
+       {
+            $aDatas['300x250 Sopra'] = array();
+            $aDatas['300x75 Sopra'] = array();
+            $aDatas['300x75 Centro'] = array();
+            $aDatas['300x75 Sotto'] = array();
+            $aDatas['300x75 Quarto'] = array();
+            $aDatas['300x250 Sotto'] = array();
+        }
+        
+        $sections_advs = SectionAdv::where('section_id', '=', $section->id)->orderBy('position')->get();
+        foreach($sections_advs as $a)
+        {
+            if (array_key_exists($a->position, $aDatas))
+                $aDatas[$a->position][] = $a;
+        }
+        
+        return view('sections_advs.index',compact('aDatas', 'section'));
+            // ->with('i', (request()->input('page', 1) - 1) * 5);
+    }
+   
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create(Section $section)
+    {
+        return view('sections_advs.create', compact('section'));
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request, Section $section, SectionAdv $section_adv)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+
+        $input["name"] = $input["name"] == null ? '' : $input["name"];
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+        $input["section_id"] = $section->id;
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/adv');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        if(request()->jingle)
+        {
+
+            $file = request()->jingle;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/news');
+
+            request()->jingle->move($path, $filename);
+
+            $input["jingle"] = $filename;
+
+        }
+
+        SectionAdv::create($input);
+   
+        return redirect()->route('sections.advs.index', compact('section'))
+                        ->with('success','Section created successfully.');
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Section  $section
+     * @return \Illuminate\Http\Response
+     */
+    public function show(SectionAdv $section_adv, Section $section)
+    {
+        return view('sections_advs.show',compact('section'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Section  $section
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Section $section, SectionAdv $adv)
+    {
+        return view('sections_advs.edit',compact('section', 'adv'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Section  $section
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Section $section, SectionAdv $adv)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["name"] = $input["name"] == null ? '' : $input["name"];
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/adv');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+        if(request()->jingle)
+        {
+
+            $file = request()->jingle;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/adv"))
+                File::makeDirectory(public_path()."/files/adv");
+            
+            $path = public_path('files/news');
+
+            request()->jingle->move($path, $filename);
+
+            $input["jingle"] = $filename;
+
+        }
+
+        $adv->update($input);
+  
+        return redirect()->route('sections.advs.index', compact('section'))
+                        ->with('success','Section adv updated successfully');
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Section  $section
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Section $section, SectionAdv $adv)
+    {
+        $adv->delete();
+  
+        return redirect()->route('sections.advs.index', compact('section'))
+                        ->with('success','Section adv deleted successfully');
+    }
+}

+ 131 - 0
app/Http/Controllers/SectionController.php

@@ -0,0 +1,131 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\Section;
+use App\News;
+use App\SectionAdv;
+use Illuminate\Http\Request;
+  
+class SectionController extends Controller
+{
+    
+    protected $rules = [
+        'name' => ['required']
+    ];
+
+    public function index()
+    {
+        $sections = Section::orderBy('position')->get(); //->paginate(50);
+  
+        return view('sections.index',compact('sections'))
+            ->with('i', (request()->input('page', 1) - 1) * 5);
+    }
+   
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        return view('sections.create');
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["position"] = $input["position"] != '' ? $input["position"] : 0;
+        $input["before"] = isset($input["before"]) ? ($input["before"] == 'on' ? true : false) : false;
+        $input["after"] = isset($input["after"]) ? ($input["after"] == 'on' ? true : false) : false;
+        $input["show_social"] = isset($input["show_social"]) ? ($input["show_social"] == 'on' ? true : false) : false;
+        $input["show_social_twitter"] = isset($input["show_social_twitter"]) ? ($input["show_social_twitter"] == 'on' ? true : false) : false;
+        Section::create($input);
+   
+        return redirect()->route('sections.index')
+                        ->with('success','Section created successfully.');
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Section  $section
+     * @return \Illuminate\Http\Response
+     */
+    public function show(Section $section)
+    {
+        return view('sections.show',compact('section'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Section  $section
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Section $section)
+    {
+        return view('sections.edit',compact('section'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Section  $section
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Section $section)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["position"] = $input["position"] != '' ? $input["position"] : 0;
+        $input["before"] = isset($input["before"]) ? ($input["before"] == 'on' ? true : false) : false;
+        $input["after"] = isset($input["after"]) ? ($input["after"] == 'on' ? true : false) : false;
+        $input["show_social"] = isset($input["show_social"]) ? ($input["show_social"] == 'on' ? true : false) : false;
+        $input["show_social_twitter"] = isset($input["show_social_twitter"]) ? ($input["show_social_twitter"] == 'on' ? true : false) : false;
+        $section->update($input);
+  
+        return redirect()->route('sections.index')
+                        ->with('success','Section updated successfully');
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Section  $section
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Section $section)
+    {
+        $news = News::where(function ($q) use ($section) {
+            $q->where('section_id', '=', $section->id)->orWhere('region_1_id', '=', $section->id)->orWhere('region_2_id', '=', $section->id);
+        })->get();
+        foreach($news as $n)
+        {
+            if ($n->section_id == $section->id)
+                $n->section_id = null;
+            if ($n->region_1_id == $section->id)
+                $n->region_1_id = null;
+            if ($n->region_2_id == $section->id)
+                $n->region_2_id = null;
+            $n->save();
+        }
+
+        SectionAdv::where('section_id', '=', $section->id)->delete();
+
+        $section->delete();
+  
+        return redirect()->route('sections.index')
+                        ->with('success','Section deleted successfully');
+    }
+}

+ 167 - 0
app/Http/Controllers/TeamController.php

@@ -0,0 +1,167 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\Team;
+use App\Category;
+use App\Group;
+use App\Season;
+use Illuminate\Http\Request;
+use Session;
+use Redirect;
+
+class TeamController extends Controller
+{
+    
+    protected $rules = [
+        'name' => ['required']
+    ];
+
+    public function index()
+    {
+        
+        
+        $type = isset($_GET["type"]) ? $_GET["type"] : '';
+        $categories = array();
+        if ($type != '')
+            $categories = Category::where('type', '=', $type)->orderBy('name')->pluck('name', 'id')->toArray();
+
+        $category_id = isset($_GET["category_id"]) ? $_GET["category_id"] : '';
+        $groups = array();
+        if ($category_id != '')
+            $groups = Group::where('category_id', '=', $category_id)->orderBy('name')->pluck('name', 'id')->toArray();
+
+        $group_id = isset($_GET["group_id"]) ? $_GET["group_id"] : '';
+
+        if (($category_id != '' && sizeof($groups) == 0) || $group_id != '')
+        {
+            $teams = Team::orderBy('name')->get(); //->paginate(50);
+            $aIds = array();
+            foreach($teams as $t)
+            {
+                $c = $t->getCalendar();
+                if (@$c->category_id == $category_id)
+                {
+                    if ($group_id != '')
+                    {
+                        if (@$c->group_id == $group_id)
+                            $aIds[] = $t->id;
+                    }
+                    else
+                        $aIds[] = $t->id;
+                }
+                    
+            }
+            $teams = Team::whereIn('id', $aIds); //->paginate(50);
+            
+        }
+        else
+        {
+            $teams = Team::where('id', '=', -1); //->paginate(50);
+        }
+
+        $season_id = isset($_GET["season_id"]) ? $_GET["season_id"] : '';
+        if ($season_id != "")
+            $teams->where('season_id', '=', $season_id);
+        $teams = $teams->orderBy('name')->get();
+
+        $seasons = Season::all()->pluck('name', 'id')->toArray();
+        Session::put('type', $type);
+        Session::put('category_id', $category_id);
+        Session::put('group_id', $group_id);
+        Session::put('season_id', $season_id);
+
+
+        return view('teams.index',compact('teams', 'categories', 'groups', 'seasons'))
+            ->with('i', (request()->input('page', 1) - 1) * 5);
+    }
+   
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        return view('teams.create');
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        
+        $input["excluded"] = isset($input["excluded"]) ? ($input["excluded"] == 'on' ? true : false) : false;
+
+        Team::create($input);
+   
+        return redirect()->route('teams.index')
+                        ->with('success','Team created successfully.');
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Team  $team
+     * @return \Illuminate\Http\Response
+     */
+    public function show(Team $team)
+    {
+        return view('teams.show',compact('team'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Team  $team
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Team $team)
+    {
+        return view('teams.edit',compact('team'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Team  $team
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Team $team)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+
+        $input["excluded"] = isset($input["excluded"]) ? ($input["excluded"] == 'on' ? true : false) : false;
+        
+        $team->update($input);
+
+        return Redirect::to('/admin/teams/?type=' . Session::get('type') . "&category_id=" . Session::get('category_id') . "&group_id=" . Session::get('group_id'). "&season_id=" . Session::get('season_id'));
+  
+        // return redirect()->route('teams.index')->with('success','Team updated successfully');
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Team  $team
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Team $team)
+    {
+        $team->delete();
+
+        return Redirect::to('/admin/teams/?type=' . Session::get('type') . "&category_id=" . Session::get('category_id') . "&group_id=" . Session::get('group_id'));
+  
+        //return redirect()->route('teams.index')->with('success','Team deleted successfully');
+    }
+}

+ 94 - 0
app/Http/Controllers/UserController.php

@@ -0,0 +1,94 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+use Auth;
+use App\User;
+use App\Http\Requests;
+use App\Http\Controllers\Controller;
+use Input;
+use DateTime;
+use Redirect;
+use Session;
+use File;
+use Image;
+use Arr;
+
+class UserController extends Controller
+{
+
+    protected $rules = [
+        'name' => ['required'],
+        'email' => ['required']
+    ];
+
+    public function index()
+    {
+        
+        $users = User::orderBy('name', 'ASC')->get();
+        return view('users.index', compact('users'));        
+    }
+
+    public function create()
+    {
+        return view('users.create');
+    }
+
+    public function store(Request $request)
+    {
+        
+        $this->validate($request, $this->rules);
+
+        // $input = $request->all();
+        
+        $input = $request->all();
+
+        $input["disabled"] = isset($input["disabled"]) ? ($input["disabled"] == 'on' ? true : false) : false;
+        
+        $input["password"] = bcrypt($input["password"]);
+
+        $user = User::create( $input );
+
+        return Redirect::route('users.index')->with('message', 'Dati salvati');
+    }
+
+    public function show($id)
+    {
+        //
+    }
+
+    public function edit(User $user)
+    {
+        return view('users.edit', compact('user'));
+    }
+
+    public function update(Request $request, User $user)
+    {
+     
+        $this->validate($request, $this->rules);
+
+        $input = Arr::except($request->all(), array('_method', '_token'));
+
+        $input["disabled"] = isset($input["disabled"]) ? ($input["disabled"] == 'on' ? true : false) : false;
+
+        if ($input["password"] != '')
+            $input["password"] = bcrypt($input["password"]);
+        else
+            $input["password"] = $user->password;
+
+        $user->update($input);
+
+        return Redirect::route('users.index')->with('message', 'Dati salvati');
+    }
+
+    public function destroy(User $user)
+    {
+        
+        $user->delete();
+
+        return Redirect::route('users.index')->with('message', 'Dati eliminati');
+    }
+
+}

+ 201 - 0
app/Http/Controllers/VideoController.php

@@ -0,0 +1,201 @@
+<?php
+  
+namespace App\Http\Controllers;
+  
+use App\Video;
+use Illuminate\Http\Request;
+use File;
+  
+class VideoController extends Controller
+{
+    
+    protected $rules = [
+        'title' => ['required']
+    ];
+
+    public function index()
+    {
+        $videos = Video::orderBy('position')->get(); //->paginate(50);
+  
+        return view('videos.index',compact('videos'))
+            ->with('i', (request()->input('video', 1) - 1) * 5);
+    }
+   
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        return view('videos.create');
+    }
+  
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        if(request()->file)
+        {
+
+            $file = request()->file;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/videos"))
+                File::makeDirectory(public_path()."/files/videos");
+            
+            $path = public_path('files/videos');
+
+            request()->file->move($path, $filename);
+
+            $input["file"] = $filename;
+
+        }
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/videos"))
+                File::makeDirectory(public_path()."/files/videos");
+            
+            $path = public_path('files/videos');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+
+        $final_date = null;
+        if ($input["date"] != '')
+        {
+            list($dt, $time) = explode(" ", $input["date"]);
+            list($day, $month, $year) = explode("/", $dt);
+            $final_date = $year . "-" . $month . "-" . $day . " " . $time;
+        }
+        $input["date"] = $final_date;
+
+        Video::create($input);
+   
+        return redirect()->route('videos.index')
+                        ->with('success','Video created successfully.');
+    }
+   
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\Video  $video
+     * @return \Illuminate\Http\Response
+     */
+    public function show(Video $video)
+    {
+        return view('videos.show',compact('video'));
+    }
+   
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\Video  $video
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(Video $video)
+    {
+        if ($video->date != null)
+        {
+            list($dt, $time) = explode(" ", $video->date);
+            list($year, $month, $day) = explode("-", $dt);
+            $final_date = $day . "/" . $month . "/" . $year . " " . $time;
+            $video->date = $final_date;
+        }
+        return view('videos.edit',compact('video'));
+    }
+  
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\Video  $video
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, Video $video)
+    {
+        $request->validate($this->rules);
+  
+        $input = $request->all();
+        $input["online"] = isset($input["online"]) ? ($input["online"] == 'on' ? true : false) : false;
+
+        if(request()->file)
+        {
+
+            $file = request()->file;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/videos"))
+                File::makeDirectory(public_path()."/files/videos");
+            
+            $path = public_path('files/videos');
+
+            request()->file->move($path, $filename);
+
+            $input["file"] = $filename;
+
+        }
+
+        if(request()->image)
+        {
+
+            $file = request()->image;
+            $filename  = time() . '_' . $file->getClientOriginalName();
+
+            if (! File::exists(public_path()."/files/videos"))
+                File::makeDirectory(public_path()."/files/videos");
+            
+            $path = public_path('files/videos');
+
+            request()->image->move($path, $filename);
+
+            $input["image"] = $filename;
+
+        }
+
+        $final_date = null;
+        if ($input["date"] != '')
+        {
+            list($dt, $time) = explode(" ", $input["date"]);
+            list($day, $month, $year) = explode("/", $dt);
+            $final_date = $year . "-" . $month . "-" . $day . " " . $time;
+        }
+        $input["date"] = $final_date;
+        
+        $video->update($input);
+  
+        return redirect()->route('videos.index')
+                        ->with('success','Video updated successfully');
+    }
+  
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\Video  $video
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(Video $video)
+    {
+        $video->delete();
+  
+        return redirect()->route('videos.index')
+                        ->with('success','Video deleted successfully');
+    }
+}

+ 67 - 0
app/Http/Kernel.php

@@ -0,0 +1,67 @@
+<?php
+
+namespace App\Http;
+
+use Illuminate\Foundation\Http\Kernel as HttpKernel;
+
+class Kernel extends HttpKernel
+{
+    /**
+     * The application's global HTTP middleware stack.
+     *
+     * These middleware are run during every request to your application.
+     *
+     * @var array
+     */
+    protected $middleware = [
+        // \App\Http\Middleware\TrustHosts::class,
+        \App\Http\Middleware\TrustProxies::class,
+        \Fruitcake\Cors\HandleCors::class,
+        \App\Http\Middleware\CheckForMaintenanceMode::class,
+        \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
+        \App\Http\Middleware\TrimStrings::class,
+        \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
+    ];
+
+    /**
+     * The application's route middleware groups.
+     *
+     * @var array
+     */
+    protected $middlewareGroups = [
+        'web' => [
+            \App\Http\Middleware\EncryptCookies::class,
+            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
+            \Illuminate\Session\Middleware\StartSession::class,
+            // \Illuminate\Session\Middleware\AuthenticateSession::class,
+            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
+            \App\Http\Middleware\VerifyCsrfToken::class,
+            \Illuminate\Routing\Middleware\SubstituteBindings::class,
+        ],
+
+        'api' => [
+            'throttle:60,1',
+            \Illuminate\Routing\Middleware\SubstituteBindings::class,
+        ],
+    ];
+
+    /**
+     * The application's route middleware.
+     *
+     * These middleware may be assigned to groups or used individually.
+     *
+     * @var array
+     */
+    protected $routeMiddleware = [
+        'auth' => \App\Http\Middleware\Authenticate::class,
+        'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
+        'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
+        'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
+        'can' => \Illuminate\Auth\Middleware\Authorize::class,
+        'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
+        'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
+        'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
+        'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
+        'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
+    ];
+}

+ 21 - 0
app/Http/Middleware/Authenticate.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Auth\Middleware\Authenticate as Middleware;
+
+class Authenticate extends Middleware
+{
+    /**
+     * Get the path the user should be redirected to when they are not authenticated.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return string|null
+     */
+    protected function redirectTo($request)
+    {
+        if (! $request->expectsJson()) {
+            return route('login');
+        }
+    }
+}

+ 17 - 0
app/Http/Middleware/CheckForMaintenanceMode.php

@@ -0,0 +1,17 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
+
+class CheckForMaintenanceMode extends Middleware
+{
+    /**
+     * The URIs that should be reachable while maintenance mode is enabled.
+     *
+     * @var array
+     */
+    protected $except = [
+        //
+    ];
+}

+ 17 - 0
app/Http/Middleware/EncryptCookies.php

@@ -0,0 +1,17 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
+
+class EncryptCookies extends Middleware
+{
+    /**
+     * The names of the cookies that should not be encrypted.
+     *
+     * @var array
+     */
+    protected $except = [
+        //
+    ];
+}

+ 27 - 0
app/Http/Middleware/RedirectIfAuthenticated.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use App\Providers\RouteServiceProvider;
+use Closure;
+use Illuminate\Support\Facades\Auth;
+
+class RedirectIfAuthenticated
+{
+    /**
+     * Handle an incoming request.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \Closure  $next
+     * @param  string|null  $guard
+     * @return mixed
+     */
+    public function handle($request, Closure $next, $guard = null)
+    {
+        if (Auth::guard($guard)->check()) {
+            return redirect(RouteServiceProvider::HOME);
+        }
+
+        return $next($request);
+    }
+}

+ 18 - 0
app/Http/Middleware/TrimStrings.php

@@ -0,0 +1,18 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
+
+class TrimStrings extends Middleware
+{
+    /**
+     * The names of the attributes that should not be trimmed.
+     *
+     * @var array
+     */
+    protected $except = [
+        'password',
+        'password_confirmation',
+    ];
+}

+ 20 - 0
app/Http/Middleware/TrustHosts.php

@@ -0,0 +1,20 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Http\Middleware\TrustHosts as Middleware;
+
+class TrustHosts extends Middleware
+{
+    /**
+     * Get the host patterns that should be trusted.
+     *
+     * @return array
+     */
+    public function hosts()
+    {
+        return [
+            $this->allSubdomainsOfApplicationUrl(),
+        ];
+    }
+}

+ 23 - 0
app/Http/Middleware/TrustProxies.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Fideloper\Proxy\TrustProxies as Middleware;
+use Illuminate\Http\Request;
+
+class TrustProxies extends Middleware
+{
+    /**
+     * The trusted proxies for this application.
+     *
+     * @var array|string|null
+     */
+    protected $proxies;
+
+    /**
+     * The headers that should be used to detect proxies.
+     *
+     * @var int
+     */
+    protected $headers = Request::HEADER_X_FORWARDED_ALL;
+}

+ 17 - 0
app/Http/Middleware/VerifyCsrfToken.php

@@ -0,0 +1,17 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
+
+class VerifyCsrfToken extends Middleware
+{
+    /**
+     * The URIs that should be excluded from CSRF verification.
+     *
+     * @var array
+     */
+    protected $except = [
+        //
+    ];
+}

+ 97 - 0
app/News.php

@@ -0,0 +1,97 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Notifications\Notifiable;
+
+class News extends Model
+{
+
+    use Notifiable;
+    
+    protected $fillable = [
+        'section_id',
+        'region_1_id',
+        'region_2_id',
+        'page_id',
+        'event_id',
+        'title',
+        'title_region_1',
+        'title_region_2',
+        'text_short',
+        'text',
+        'image',
+        'online',
+        'homepage',
+        'date',
+        'slug',
+        'meta_title',
+        'meta_description',
+        'meta_keywords',
+        'live',
+        'image1',
+        'image2',
+        'image3',
+        'image4',
+        'image5',
+        'video',
+        'pdf',
+        'breaking_news',
+        'clicks',
+        'section_position',
+        'region_1_position',
+        'region_2_position',
+        'published'
+    ];
+
+    public function section()
+    {
+        return $this->belongsTo('App\Section');
+    }
+
+    public function region_1()
+    {
+        return $this->belongsTo('App\Section');
+    }
+
+    public function region_2()
+    {
+        return $this->belongsTo('App\Section');
+    }
+
+    public function event()
+    {
+        return $this->belongsTo('App\Event');
+    }
+
+    public function page()
+    {
+        return $this->belongsTo('App\Page');
+    }
+
+    public function user()
+    {
+        return $this->belongsTo('App\User');
+    }
+
+    public function getCurrentTitle($section_id)
+    {
+
+        $title = '';
+
+        if ($this->section_id == $section_id)
+            $title = $this->title;
+        if ($this->region_1_id == $section_id)
+            $title = $this->title_region_1;
+        if ($this->region_2_id == $section_id)
+            $title = $this->title_region_2;
+        
+        if ($title == '')
+            $title = $this->title;
+
+        return $title;
+
+    }
+
+}

+ 76 - 0
app/Notifications/FacebookPost.php

@@ -0,0 +1,76 @@
+<?php
+
+namespace App\Notifications;
+
+use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Notifications\Messages\MailMessage;
+use Illuminate\Notifications\Notification;
+
+use NotificationChannels\FacebookPoster\FacebookPosterChannel;
+use NotificationChannels\FacebookPoster\FacebookPosterPost;
+
+class FacebookPost extends Notification
+{
+    use Queueable;
+
+    /**
+     * Create a new notification instance.
+     *
+     * @return void
+     */
+    public function __construct()
+    {
+        //
+    }
+
+    /**
+     * Get the notification's delivery channels.
+     *
+     * @param  mixed  $notifiable
+     * @return array
+     */
+    public function via($notifiable)
+    {
+        return [FacebookPosterChannel::class];
+        //return ['mail'];
+    }
+
+    /**
+     * Get the mail representation of the notification.
+     *
+     * @param  mixed  $notifiable
+     * @return \Illuminate\Notifications\Messages\MailMessage
+     */
+    public function toMail($notifiable)
+    {
+        return (new MailMessage)
+                    ->line('The introduction to the notification.')
+                    ->action('Notification Action', url('/'))
+                    ->line('Thank you for using our application!');
+    }
+
+    /**
+     * Get the array representation of the notification.
+     *
+     * @param  mixed  $notifiable
+     * @return array
+     */
+    public function toArray($notifiable)
+    {
+        return [
+            //
+        ];
+    }
+
+    public function toFacebookPoster($notifiable) {
+        
+        $url = url(env('APP_URL') . "/" . $notifiable->slug);
+        //$title = $notifiable->title;        
+        //$title = str_replace("’", "'", $title);
+        //$title = str_replace('“', "'", $title);
+        $text = $notifiable->title;
+        return (new FacebookPosterPost($text))->withLink($url);
+    }
+
+}

+ 71 - 0
app/Notifications/TwitterPost.php

@@ -0,0 +1,71 @@
+<?php
+
+namespace App\Notifications;
+
+use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Notifications\Messages\MailMessage;
+use Illuminate\Notifications\Notification;
+
+use NotificationChannels\Twitter\TwitterChannel;
+use NotificationChannels\Twitter\TwitterStatusUpdate;
+
+class TwitterPost extends Notification
+{
+    use Queueable;
+
+    /**
+     * Create a new notification instance.
+     *
+     * @return void
+     */
+    public function __construct()
+    {
+        //
+    }
+
+    /**
+     * Get the notification's delivery channels.
+     *
+     * @param  mixed  $notifiable
+     * @return array
+     */
+    public function via($notifiable)
+    {
+        return [TwitterChannel::class];
+        // return ['mail'];
+    }
+
+    /**
+     * Get the mail representation of the notification.
+     *
+     * @param  mixed  $notifiable
+     * @return \Illuminate\Notifications\Messages\MailMessage
+     */
+    public function toMail($notifiable)
+    {
+        return (new MailMessage)
+                    ->line('The introduction to the notification.')
+                    ->action('Notification Action', url('/'))
+                    ->line('Thank you for using our application!');
+    }
+
+    /**
+     * Get the array representation of the notification.
+     *
+     * @param  mixed  $notifiable
+     * @return array
+     */
+    public function toArray($notifiable)
+    {
+        return [
+            //
+        ];
+    }
+
+    public function toTwitter($notifiable)
+    {
+        $text = "Calcio a 5 Anteprima - " . $notifiable->title . " " . url(env('APP_URL') . "/" . $notifiable->slug);
+        return new TwitterStatusUpdate($text);//->withImage('marcel.png');
+    }
+}

+ 52 - 0
app/Page.php

@@ -0,0 +1,52 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Page extends Model
+{
+
+    protected $fillable = [
+        'title',
+        'text_short',
+        'text',
+        'slug',
+        'image',
+        'online',
+        'web',
+        'email',
+        'facebook',
+        'twitter',
+        'instagram',
+        'youtube'
+    ];
+
+    public function advs()
+    {
+        return $this->hasMany('App\PageAdv');
+    }
+
+    public function getAdvs()
+    {
+        
+        $advs['Sopra 234x60 1'] = array();
+        $advs['Sopra 234x60 2'] = array();
+        $advs['Sopra 234x60 3'] = array();
+        $advs['Sopra 234x60 4'] = array();
+        $advs['Sotto 234x60 1'] = array();
+        $advs['Sotto 234x60 2'] = array();
+        $advs['Sotto 234x60 3'] = array();
+        $advs['Sotto 234x60 4'] = array();
+        $advs['728x90'] = array();
+
+        $pages_advs = $this->advs()->where('online', '=', true)->orderBy('sort')->get();
+        foreach($pages_advs as $a)
+        {
+            $advs[$a->position][] = $a;
+        }
+        return $advs;
+
+    }
+
+}

+ 22 - 0
app/PageAdv.php

@@ -0,0 +1,22 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class PageAdv extends Model
+{
+
+    protected $fillable = [
+        'page_id',
+        'name',
+        'position',
+        'google_code',
+        'image',
+        'jingle',
+        'url',
+        'online',
+        'sort'
+    ];
+
+}

+ 29 - 0
app/Providers/AppServiceProvider.php

@@ -0,0 +1,29 @@
+<?php
+
+namespace App\Providers;
+
+use Illuminate\Support\ServiceProvider;
+use Illuminate\Support\Facades\Schema;
+
+class AppServiceProvider extends ServiceProvider
+{
+    /**
+     * Register any application services.
+     *
+     * @return void
+     */
+    public function register()
+    {
+        //
+    }
+
+    /**
+     * Bootstrap any application services.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        Schema::defaultStringLength(191);
+    }
+}

+ 30 - 0
app/Providers/AuthServiceProvider.php

@@ -0,0 +1,30 @@
+<?php
+
+namespace App\Providers;
+
+use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
+use Illuminate\Support\Facades\Gate;
+
+class AuthServiceProvider extends ServiceProvider
+{
+    /**
+     * The policy mappings for the application.
+     *
+     * @var array
+     */
+    protected $policies = [
+        // 'App\Model' => 'App\Policies\ModelPolicy',
+    ];
+
+    /**
+     * Register any authentication / authorization services.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        $this->registerPolicies();
+
+        //
+    }
+}

+ 21 - 0
app/Providers/BroadcastServiceProvider.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App\Providers;
+
+use Illuminate\Support\Facades\Broadcast;
+use Illuminate\Support\ServiceProvider;
+
+class BroadcastServiceProvider extends ServiceProvider
+{
+    /**
+     * Bootstrap any application services.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        Broadcast::routes();
+
+        require base_path('routes/channels.php');
+    }
+}

+ 34 - 0
app/Providers/EventServiceProvider.php

@@ -0,0 +1,34 @@
+<?php
+
+namespace App\Providers;
+
+use Illuminate\Auth\Events\Registered;
+use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
+use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
+use Illuminate\Support\Facades\Event;
+
+class EventServiceProvider extends ServiceProvider
+{
+    /**
+     * The event listener mappings for the application.
+     *
+     * @var array
+     */
+    protected $listen = [
+        Registered::class => [
+            SendEmailVerificationNotification::class,
+        ],
+    ];
+
+    /**
+     * Register any events for your application.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        parent::boot();
+
+        //
+    }
+}

+ 80 - 0
app/Providers/RouteServiceProvider.php

@@ -0,0 +1,80 @@
+<?php
+
+namespace App\Providers;
+
+use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
+use Illuminate\Support\Facades\Route;
+
+class RouteServiceProvider extends ServiceProvider
+{
+    /**
+     * This namespace is applied to your controller routes.
+     *
+     * In addition, it is set as the URL generator's root namespace.
+     *
+     * @var string
+     */
+    protected $namespace = 'App\Http\Controllers';
+
+    /**
+     * The path to the "home" route for your application.
+     *
+     * @var string
+     */
+    public const HOME = '/home';
+
+    /**
+     * Define your route model bindings, pattern filters, etc.
+     *
+     * @return void
+     */
+    public function boot()
+    {
+        //
+
+        parent::boot();
+    }
+
+    /**
+     * Define the routes for the application.
+     *
+     * @return void
+     */
+    public function map()
+    {
+        $this->mapApiRoutes();
+
+        $this->mapWebRoutes();
+
+        //
+    }
+
+    /**
+     * Define the "web" routes for the application.
+     *
+     * These routes all receive session state, CSRF protection, etc.
+     *
+     * @return void
+     */
+    protected function mapWebRoutes()
+    {
+        Route::middleware('web')
+            ->namespace($this->namespace)
+            ->group(base_path('routes/web.php'));
+    }
+
+    /**
+     * Define the "api" routes for the application.
+     *
+     * These routes are typically stateless.
+     *
+     * @return void
+     */
+    protected function mapApiRoutes()
+    {
+        Route::prefix('api')
+            ->middleware('api')
+            ->namespace($this->namespace)
+            ->group(base_path('routes/api.php'));
+    }
+}

+ 22 - 0
app/Ranking.php

@@ -0,0 +1,22 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Ranking extends Model
+{
+
+    protected $fillable = [
+        'calendar_id',
+        'team_id',
+        'played',
+        'wins',
+        'dwars',
+        'losts',
+        'goals_scored',
+        'goals_conceded',
+        'points'
+    ];
+
+}

+ 15 - 0
app/Season.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Season extends Model
+{
+
+    protected $fillable = [
+        'name',
+        'default'
+    ];
+
+}

+ 1032 - 0
app/Section.php

@@ -0,0 +1,1032 @@
+<?php
+
+namespace App;
+
+use App\News;
+
+use Illuminate\Database\Eloquent\Model;
+
+use App\Notifications\FacebookPost;
+use App\Notifications\TwitterPost;
+
+class Section extends Model
+{
+
+    protected $fillable = [
+        'name',
+        'type',
+        'position',
+        'layout',
+        'big',
+        'medium1',
+        'medium2',
+        'medium3',
+        'small1',
+        'small2',
+        'small3',
+        'small4',
+        'small5',
+        'small6',
+        'slug',
+        'before',
+        'after',
+        'show_social',
+        'show_social_twitter'
+    ];
+
+    function loadLayout()
+    {
+
+        $id = $this->id;
+
+        $this->data = $this;
+        if ($this->big != '')
+        {
+            $n = News::find($this->big);
+            if ($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                $this->big = $n;
+            }
+        }
+        
+        if ($this->small1 != '')
+        {
+            $n = News::find($this->small1);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                $this->small1 = $n;
+            }
+        }
+        if ($this->small2 != '')
+        {
+            $n = News::find($this->small2);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                $this->small2 = $n;
+            }
+        }
+        if ($this->small3 != '')
+        {
+            $n = News::find($this->small3);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                $this->small3 = $n;
+            }
+        }
+        if ($this->small4 != '')
+        {
+            $n = News::find($this->small4);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                $this->small4 = $n;
+            }
+        }
+        if ($this->small5 != '')
+        {
+            $n = News::find($this->small5);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                $this->small5 = $n;
+            }
+        }
+        if ($this->small6 != '')
+        {
+            $n = News::find($this->small6);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                $this->small6 = $n;
+            }
+        }
+
+    }
+
+    /*
+    function generateLayout()
+    {
+
+        $id = $this->id;
+
+        $aExist = array();
+        if ($this->big != '')
+        {
+            $n = News::find($this->big);
+            if ($n != null)
+            {
+                if ($n->section_id == $id && $n->section_position != '')
+                {
+                    $n->section_position = '';
+                    $n->save();
+                }
+                if ($n->region_1_id == $id && $n->region_1_position != '')
+                {
+                    $n->region_1_position = '';
+                    $n->save();
+                }
+                if ($n->region_2_id == $id && $n->region_2_position != '')
+                {
+                    $n->region_2_position = '';
+                    $n->save();
+                }
+            }
+            $aExist[] = $this->big;
+        }
+        if ($this->small1 != '')
+        {
+            $n = News::find($this->small1);
+            if ($n != null)
+            {
+                if ($n->section_id == $id && $n->section_position != '')
+                {
+                    $n->section_position = '';
+                    $n->save();
+                }
+                if ($n->region_1_id == $id && $n->region_1_position != '')
+                {
+                    $n->region_1_position = '';
+                    $n->save();
+                }
+                if ($n->region_2_id == $id && $n->region_2_position != '')
+                {
+                    $n->region_2_position = '';
+                    $n->save();
+                }
+            }
+            $aExist[] = $this->small1;
+        }
+        if ($this->small2 != '')
+        {
+            $n = News::find($this->small2);
+            if ($n != null)
+            {
+                if ($n->section_id == $id && $n->section_position != '')
+                {
+                    $n->section_position = '';
+                    $n->save();
+                }
+                if ($n->region_1_id == $id && $n->region_1_position != '')
+                {
+                    $n->region_1_position = '';
+                    $n->save();
+                }
+                if ($n->region_2_id == $id && $n->region_2_position != '')
+                {
+                    $n->region_2_position = '';
+                    $n->save();
+                }
+            }
+            $aExist[] = $this->small2;
+        }
+        if ($this->small3 != '')
+        {
+            $n = News::find($this->small3);
+            if ($n != null)
+            {
+                if ($n->section_id == $id && $n->section_position != '')
+                {
+                    $n->section_position = '';
+                    $n->save();
+                }
+                if ($n->region_1_id == $id && $n->region_1_position != '')
+                {
+                    $n->region_1_position = '';
+                    $n->save();
+                }
+                if ($n->region_2_id == $id && $n->region_2_position != '')
+                {
+                    $n->region_2_position = '';
+                    $n->save();
+                }
+            }
+            $aExist[] = $this->small3;
+        }
+        if ($this->small4 != '')
+        {
+            $n = News::find($this->small4);
+            if ($n != null)
+            {
+                if ($n->section_id == $id && $n->section_position != '')
+                {
+                    $n->section_position = '';
+                    $n->save();
+                }
+                if ($n->region_1_id == $id && $n->region_1_position != '')
+                {
+                    $n->region_1_position = '';
+                    $n->save();
+                }
+                if ($n->region_2_id == $id && $n->region_2_position != '')
+                {
+                    $n->region_2_position = '';
+                    $n->save();
+                }
+            }
+            $aExist[] = $this->small4;
+        }
+        if ($this->small5 != '')
+        {
+            $n = News::find($this->small5);
+            if ($n != null)
+            {
+                if ($n->section_id == $id && $n->section_position != '')
+                {
+                    $n->section_position = '';
+                    $n->save();
+                }
+                if ($n->region_1_id == $id && $n->region_1_position != '')
+                {
+                    $n->region_1_position = '';
+                    $n->save();
+                }
+                if ($n->region_2_id == $id && $n->region_2_position != '')
+                {
+                    $n->region_2_position = '';
+                    $n->save();
+                }
+            }
+            $aExist[] = $this->small5;
+        }
+        if ($this->small6 != '')
+        {
+            $n = News::find($this->small6);
+            if ($n != null)
+            {
+                if ($n->section_id == $id && $n->section_position != '')
+                {
+                    $n->section_position = '';
+                    $n->save();
+                }
+                if ($n->region_1_id == $id && $n->region_1_position != '')
+                {
+                    $n->region_1_position = '';
+                    $n->save();
+                }
+                if ($n->region_2_id == $id && $n->region_2_position != '')
+                {
+                    $n->region_2_position = '';
+                    $n->save();
+                }
+            }
+            $aExist[] = $this->small6;
+        }
+            
+        $this->data = $this;
+        if ($this->big != '')
+        {
+            $n = News::find($this->big);
+            if ($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                $position = 'big';
+
+                // Controllo se c'è una news dopo questa da pubblicare che va in questa sezione/posizione, se si faccio il replace
+                $checks = News::whereNotIn('id', $aExist)->where('date', '<=', date('Y-m-d H:i:s'))->where('online', '=', true)->where(function ($q) use ($id) {
+                    $q->where('region_1_id', '=', $id)->orWhere('region_2_id', '=', $id)->orWhere('section_id', '=', $id);
+                })->where(function ($q) use ($position) {
+                    $q->where('region_1_position', '=', $position)->orWhere('region_2_position', '=', $position)->orWhere('section_position', '=', $position);
+                })->get();
+                foreach($checks as $c)
+                {
+                    
+                    if ($c->section_id == $id && $c->section_position == $position)
+                    {
+                        $s = Section::findOrFail($this->id);
+                        $s->big = $c->id;
+                        $s->save();
+                        $c->section_position = '';
+                        if (!$c->published)
+                        {
+                            $c->notify(new FacebookPost());
+                            $c->notify(new TwitterPost());
+                            $c->published = true;
+                        }
+                        $c->save();
+                        $n = $c;
+                        break;
+                    }
+                    if ($c->region_1_id == $id && $c->region_1_position == $position)
+                    {
+                        $s = Section::findOrFail($this->id);
+                        $s->big = $c->id;
+                        $s->save();
+                        $c->region_1_position = '';
+                        if (!$c->published)
+                        {
+                            $c->notify(new FacebookPost());
+                            $c->notify(new TwitterPost());
+                            $c->published = true;
+                        }
+                        $c->save();
+                        $n = $c;
+                        break;
+                    }
+                    if ($c->region_2_id == $id && $c->region_2_position == $position)
+                    {
+                        $s = Section::findOrFail($this->id);
+                        $s->big = $c->id;
+                        $s->save();
+                        $c->region_2_position = '';
+                        if (!$c->published)
+                        {
+                            $c->notify(new FacebookPost());
+                            $c->notify(new TwitterPost());
+                            $c->published = true;
+                        }
+                        $c->save();
+                        $n = $c;
+                        break;
+                    }
+                }
+
+                $this->big = $n;
+            }
+        }
+        
+        if ($this->small1 != '')
+        {
+            $n = News::find($this->small1);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                    $position = 'small1';
+
+                    // Controllo se c'è una news dopo questa da pubblicare che va in questa sezione/posizione, se si faccio il replace
+                    $checks = News::whereNotIn('id', $aExist)->where('date', '<=', date('Y-m-d H:i:s'))->where('online', '=', true)->where(function ($q) use ($id) {
+                        $q->where('region_1_id', '=', $id)->orWhere('region_2_id', '=', $id)->orWhere('section_id', '=', $id);
+                    })->where(function ($q) use ($position) {
+                        $q->where('region_1_position', '=', $position)->orWhere('region_2_position', '=', $position)->orWhere('section_position', '=', $position);
+                    })->get();
+                    foreach($checks as $c)
+                    {
+                        if ($c->section_id == $id && $c->section_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small1 = $c->id;
+                            $s->save();
+                            $c->section_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                        if ($c->region_1_id == $id && $c->region_1_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small1 = $c->id;
+                            $s->save();
+                            $c->region_1_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                        if ($c->region_2_id == $id && $c->region_2_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small1 = $c->id;
+                            $s->save();
+                            $c->region_2_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                    }
+
+                $this->small1 = $n;
+            }
+        }
+        if ($this->small2 != '')
+        {
+            $n = News::find($this->small2);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                    $position = 'small2';
+
+                    // Controllo se c'è una news dopo questa da pubblicare che va in questa sezione/posizione, se si faccio il replace
+                    $checks = News::whereNotIn('id', $aExist)->where('date', '<=', date('Y-m-d H:i:s'))->where('online', '=', true)->where(function ($q) use ($id) {
+                        $q->where('region_1_id', '=', $id)->orWhere('region_2_id', '=', $id)->orWhere('section_id', '=', $id);
+                    })->where(function ($q) use ($position) {
+                        $q->where('region_1_position', '=', $position)->orWhere('region_2_position', '=', $position)->orWhere('section_position', '=', $position);
+                    })->get();
+                    foreach($checks as $c)
+                    {
+                        if ($c->section_id == $id && $c->section_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small2 = $c->id;
+                            $s->save();
+                            $c->section_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                        if ($c->region_1_id == $id && $c->region_1_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small2 = $c->id;
+                            $s->save();
+                            $c->region_1_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                        if ($c->region_2_id == $id && $c->region_2_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small2 = $c->id;
+                            $s->save();
+                            $c->region_2_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                    }
+
+                $this->small2 = $n;
+            }
+        }
+        if ($this->small3 != '')
+        {
+            $n = News::find($this->small3);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                $position = 'small3';
+
+                // Controllo se c'è una news dopo questa da pubblicare che va in questa sezione/posizione, se si faccio il replace
+                $checks = News::whereNotIn('id', $aExist)->where('date', '<=', date('Y-m-d H:i:s'))->where('online', '=', true)->where(function ($q) use ($id) {
+                    $q->where('region_1_id', '=', $id)->orWhere('region_2_id', '=', $id)->orWhere('section_id', '=', $id);
+                })->where(function ($q) use ($position) {
+                    $q->where('region_1_position', '=', $position)->orWhere('region_2_position', '=', $position)->orWhere('section_position', '=', $position);
+                })->get();
+                foreach($checks as $c)
+                {
+                    if ($c->section_id == $id && $c->section_position == $position)
+                    {
+                        $s = Section::findOrFail($this->id);
+                        $s->small3 = $c->id;
+                        $s->save();
+                        $c->section_position = '';
+                        if (!$c->published)
+                        {
+                            $c->notify(new FacebookPost());
+                            $c->notify(new TwitterPost());
+                            $c->published = true;
+                        }
+                        $c->save();
+                        $n = $c;
+                        break;
+                    }
+                    if ($c->region_1_id == $id && $c->region_1_position == $position)
+                    {
+                        $s = Section::findOrFail($this->id);
+                        $s->small3 = $c->id;
+                        $s->save();
+                        $c->region_1_position = '';
+                        if (!$c->published)
+                        {
+                            $c->notify(new FacebookPost());
+                            $c->notify(new TwitterPost());
+                            $c->published = true;
+                        }
+                        $c->save();
+                        $n = $c;
+                        break;
+                    }
+                    if ($c->region_2_id == $id && $c->region_2_position == $position)
+                    {
+                        $s = Section::findOrFail($this->id);
+                        $s->small3 = $c->id;
+                        $s->save();
+                        $c->region_2_position = '';
+                        if (!$c->published)
+                        {
+                            $c->notify(new FacebookPost());
+                            $c->notify(new TwitterPost());
+                            $c->published = true;
+                        }
+                        $c->save();
+                        $n = $c;
+                        break;
+                    }
+                }
+
+                $this->small3 = $n;
+            }
+        }
+        if ($this->small4 != '')
+        {
+            $n = News::find($this->small4);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+                
+                    $position = 'small4';
+
+                    // Controllo se c'è una news dopo questa da pubblicare che va in questa sezione/posizione, se si faccio il replace
+                    $checks = News::whereNotIn('id', $aExist)->where('date', '<=', date('Y-m-d H:i:s'))->where('online', '=', true)->where(function ($q) use ($id) {
+                        $q->where('region_1_id', '=', $id)->orWhere('region_2_id', '=', $id)->orWhere('section_id', '=', $id);
+                    })->where(function ($q) use ($position) {
+                        $q->where('region_1_position', '=', $position)->orWhere('region_2_position', '=', $position)->orWhere('section_position', '=', $position);
+                    })->get();
+                    foreach($checks as $c)
+                    {
+                        if ($c->section_id == $id && $c->section_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small4 = $c->id;
+                            $s->save();
+                            $c->section_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                        if ($c->region_1_id == $id && $c->region_1_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small4 = $c->id;
+                            $s->save();
+                            $c->region_1_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                        if ($c->region_2_id == $id && $c->region_2_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small4 = $c->id;
+                            $s->save();
+                            $c->region_2_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                    }
+
+                $this->small4 = $n;
+            }
+        }
+        if ($this->small5 != '')
+        {
+            $n = News::find($this->small5);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                    $position = 'small5';
+
+                    // Controllo se c'è una news dopo questa da pubblicare che va in questa sezione/posizione, se si faccio il replace
+                    $checks = News::whereNotIn('id', $aExist)->where('date', '<=', date('Y-m-d H:i:s'))->where('online', '=', true)->where(function ($q) use ($id) {
+                        $q->where('region_1_id', '=', $id)->orWhere('region_2_id', '=', $id)->orWhere('section_id', '=', $id);
+                    })->where(function ($q) use ($position) {
+                        $q->where('region_1_position', '=', $position)->orWhere('region_2_position', '=', $position)->orWhere('section_position', '=', $position);
+                    })->get();
+                    foreach($checks as $c)
+                    {
+                        if ($c->section_id == $id && $c->section_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small5 = $c->id;
+                            $s->save();
+                            $c->section_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                        if ($c->region_1_id == $id && $c->region_1_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small5 = $c->id;
+                            $s->save();
+                            $c->region_1_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                        if ($c->region_2_id == $id && $c->region_2_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small5 = $c->id;
+                            $s->save();
+                            $c->region_2_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                    }
+
+                $this->small5 = $n;
+            }
+        }
+        if ($this->small6 != '')
+        {
+            $n = News::find($this->small6);
+            if($n != null)
+            {
+                if (!$n->online)
+                    $n = null;
+
+                    $position = 'small6';
+
+                    // Controllo se c'è una news dopo questa da pubblicare che va in questa sezione/posizione, se si faccio il replace
+                    $checks = News::whereNotIn('id', $aExist)->where('date', '<=', date('Y-m-d H:i:s'))->where('online', '=', true)->where(function ($q) use ($id) {
+                        $q->where('region_1_id', '=', $id)->orWhere('region_2_id', '=', $id)->orWhere('section_id', '=', $id);
+                    })->where(function ($q) use ($position) {
+                        $q->where('region_1_position', '=', $position)->orWhere('region_2_position', '=', $position)->orWhere('section_position', '=', $position);
+                    })->get();
+                    foreach($checks as $c)
+                    {
+                        if ($c->section_id == $id && $c->section_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small6 = $c->id;
+                            $s->save();
+                            $c->section_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                        if ($c->region_1_id == $id && $c->region_1_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small6 = $c->id;
+                            $s->save();
+                            $c->region_1_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                        if ($c->region_2_id == $id && $c->region_2_position == $position)
+                        {
+                            $s = Section::findOrFail($this->id);
+                            $s->small6 = $c->id;
+                            $s->save();
+                            $c->region_2_position = '';
+                            if (!$c->published)
+                            {
+                                $c->notify(new FacebookPost());
+                                $c->notify(new TwitterPost());
+                                $c->published = true;
+                            }
+                            $c->save();
+                            $n = $c;
+                            break;
+                        }
+                    }
+
+                $this->small6 = $n;
+            }
+        }
+
+    }*/
+
+    function news_online($type)
+    {
+        if ($type == 'section')
+            return News::where('section_id', '=', $this->id)->where('online', '=', true)->count();
+        else
+        {
+            $id = $this->id;
+            return News::where('online', '=', true)->where(function ($q) use ($id) {
+                $q->where('region_1_id', '=', $id)->orWhere('region_2_id', '=', $id);
+            })->count();
+        }
+    }
+
+    function news($type)
+    {
+        if ($type == 'section')
+            return News::where('section_id', '=', $this->id)->count();
+        else
+            return News::where('region_1_id', '=', $this->id)->orWhere('region_2_id', '=', $this->id)->count();
+    }
+    
+    public function advs()
+    {
+        return $this->hasMany('App\SectionAdv');
+    }
+
+    public function getAdvs()
+    {
+
+        $advs = array();
+
+        $sections_advs = $this->advs()->where('online', '=', true)->get(); //SectionAdv::where('section_id', '=', $section->id)->orderBy('position')->get();
+        foreach($sections_advs as $a)
+        {
+            $advs[$a->position][] = $a;
+        }
+        
+        return $advs;
+
+    }
+
+    public function position($news_id)
+    {
+
+        $img = '';
+        if ($this->layout != '')
+        {
+            if($this->big == $news_id)
+                $img = $this->layout . '_big';
+            /*if($this->medium1 == $news_id)
+                $img = $this->layout . '_medium1';
+            if($this->medium2 == $news_id)
+                $img = $this->layout . '_medium2';
+            if($this->medium3 == $news_id)
+                $img = $this->layout . '_medium3';*/
+            if($this->small1 == $news_id)
+                $img = $this->layout . '_small1';
+            if($this->small2 == $news_id)
+                $img = $this->layout . '_small2';
+            if($this->small3 == $news_id)
+                $img = $this->layout . '_small3';
+            if($this->small4 == $news_id)
+                $img = $this->layout . '_small4';
+            if($this->small5 == $news_id)
+                $img = $this->layout . '_small5';
+            if($this->small6 == $news_id)
+                $img = $this->layout . '_small6';
+            
+            
+
+        }
+        
+        $ret = '';
+        if ($img != '')
+            $ret = '<img src="/images/layout/' . $img . '.jpg" style="max-width:100px;">';
+        
+        return $ret;
+
+    }
+
+    /*
+    public function clearLayout()
+    {
+
+        $id = $this->id;
+
+        $aSel = array();
+        if ($this->big)
+            $aSel[] = $this->big;
+        if ($this->small1)
+            $aSel[] = $this->small1;
+        if ($this->small2)
+            $aSel[] = $this->small2;
+        if ($this->small3)
+            $aSel[] = $this->small3;
+        if ($this->small4)
+            $aSel[] = $this->small4;
+        if ($this->small5)
+            $aSel[] = $this->small5;
+        if ($this->small6)
+            $aSel[] = $this->small6;
+
+        $news = News::whereNotIn('id', $aSel)->where(function ($q) use ($id) {
+            $q->where('section_id', '=', $id)->orWhere('region_1_id', '=', $id)->orWhere('region_2_id', '=', $id);
+        })->where(function ($q)  {
+            $q->where('region_1_position', '<>', '')->orWhere('region_2_position', '<>', '')->orWhere('section_position', '<>', '');
+        })->where('online', '=', true)->where('date', '<=', date("Y-m-d 23:59:59"))->where('breaking_news', '=', false)->orderBy('date', 'DESC')->get();
+        
+        $idx = 0;
+        if ($this->big == '')
+        {
+            $this->big = @$news[$idx]->id;
+            $idx++;
+        }
+        else
+        {
+            $n = News::where('id', '=', $this->big)->where('online', '=', true)->where('date', '<=', date("Y-m-d 23:59:59"))->where('breaking_news', '=', false)->first();
+            if (!$n || !$n->online) 
+            {
+                $this->big = @$news[$idx]->id;
+
+                $idx++;
+            }
+        }
+
+        if ($this->small1 == '')
+        {
+            $this->small1 = @$news[$idx]->id;
+            $idx++;
+        }
+        else
+        {
+            $n = News::where('id', '=', $this->small1)->where('online', '=', true)->where('date', '<=', date("Y-m-d 23:59:59"))->where('breaking_news', '=', false)->first();
+            if (!$n || !$n->online)
+            {
+                $this->small1 = @$news[$idx]->id;
+                $idx++;
+            }
+        }
+        if ($this->small2 == '')
+        {
+            $this->small2 = @$news[$idx]->id;
+            $idx++;
+        }
+        else
+        {
+            $n = News::where('id', '=', $this->small2)->where('online', '=', true)->where('date', '<=', date("Y-m-d 23:59:59"))->where('breaking_news', '=', false)->first();
+            if (!$n || !$n->online)
+            {
+                $this->small2 = @$news[$idx]->id;
+                $idx++;
+            }
+        }
+        if ($this->small3 == '')
+        {
+            $this->small3 = @$news[$idx]->id;
+            $idx++;
+        }
+        else
+        {
+            $n = News::where('id', '=', $this->small3)->where('online', '=', true)->where('date', '<=', date("Y-m-d 23:59:59"))->where('breaking_news', '=', false)->first();
+            if (!$n || !$n->online)
+            {
+                $this->small3 = @$news[$idx]->id;
+                $idx++;
+            }
+        }
+
+        if ($this->layout == 'layout_3' || $this->layout == 'layout_4' || $this->layout == 'layout_5')
+        {
+            if ($this->small4 == '')
+            {
+                $this->small4 = @$news[$idx]->id;
+                $idx++;
+            }
+            else
+            {
+                $n = News::where('id', '=', $this->small4)->where('online', '=', true)->where('date', '<=', date("Y-m-d 23:59:59"))->where('breaking_news', '=', false)->first();
+                if (!$n || !$n->online)
+                {
+                    $this->small4 = @$news[$idx]->id;
+                    $idx++;
+                }
+            }
+
+            if ($this->layout == 'layout_4')
+            {
+                if ($this->small5 == '')
+                {
+                    $this->small5 = @$news[$idx]->id;
+                    $idx++;
+                }
+                else
+                {
+                    $n = News::where('id', '=', $this->small5)->where('online', '=', true)->where('date', '<=', date("Y-m-d 23:59:59"))->where('breaking_news', '=', false)->first();
+                    if (!$n || !$n->online)
+                    {
+                        $this->small5 = @$news[$idx]->id;
+                        $idx++;
+                    }
+                }
+                if ($this->small6 == '')
+                {
+                    $this->small6 = @$news[$idx]->id;
+                    $idx++;
+                }
+                else
+                {
+                    $n = News::where('id', '=', $this->small6)->where('online', '=', true)->where('date', '<=', date("Y-m-d 23:59:59"))->where('breaking_news', '=', false)->first();
+                    if (!$n || !$n->online)
+                    {
+                        $this->small6 = @$news[$idx]->id;
+                        $idx++;
+                    }
+                }
+            }
+            else
+            {
+                $this->small5 = '';
+                $this->small6 = '';
+            }
+        }
+        else
+        {
+            $this->small4 = '';
+            $this->small5 = '';
+            $this->small6 = '';
+        }
+        $this->save();
+
+        $this->generateLayout();
+        // $section->save();
+
+    }
+    */
+
+}

+ 21 - 0
app/SectionAdv.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class SectionAdv extends Model
+{
+
+    protected $fillable = [
+        'section_id',
+        'name',
+        'position',
+        'google_code',
+        'image',
+        'jingle',
+        'url',
+        'online'
+    ];
+
+}

+ 32 - 0
app/Team.php

@@ -0,0 +1,32 @@
+<?php
+
+namespace App;
+use App\CalendarGame;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Team extends Model
+{
+
+    protected $fillable = [
+        'name',
+        'penality',
+        'excluded',
+        'day',
+        'type',
+        'season_id'
+    ];
+
+    function getCalendar()
+    {
+        $game = CalendarGame::where('home_team_id', '=', $this->id)->first();
+        $calendar = Calendar::where('id', '=', @$game->calendar_id)->first();
+        return $calendar;
+    }
+
+    public function season()
+    {
+        return $this->belongsTo('App\Season');
+    }
+
+}

+ 39 - 0
app/User.php

@@ -0,0 +1,39 @@
+<?php
+
+namespace App;
+
+use Illuminate\Contracts\Auth\MustVerifyEmail;
+use Illuminate\Foundation\Auth\User as Authenticatable;
+use Illuminate\Notifications\Notifiable;
+
+class User extends Authenticatable
+{
+    use Notifiable;
+
+    /**
+     * The attributes that are mass assignable.
+     *
+     * @var array
+     */
+    protected $fillable = [
+        'name', 'email', 'password','disabled','level'
+    ];
+
+    /**
+     * The attributes that should be hidden for arrays.
+     *
+     * @var array
+     */
+    protected $hidden = [
+        'password', 'remember_token',
+    ];
+
+    /**
+     * The attributes that should be cast to native types.
+     *
+     * @var array
+     */
+    protected $casts = [
+        'email_verified_at' => 'datetime',
+    ];
+}

+ 22 - 0
app/Video.php

@@ -0,0 +1,22 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Video extends Model
+{
+
+    protected $fillable = [
+        'title',
+        'url',
+        'position',
+        'image',
+        'file',
+        'date',
+        'online',
+        'type',
+        'embed'
+    ];
+
+}

+ 53 - 0
artisan

@@ -0,0 +1,53 @@
+#!/usr/bin/env php
+<?php
+
+define('LARAVEL_START', microtime(true));
+
+/*
+|--------------------------------------------------------------------------
+| Register The Auto Loader
+|--------------------------------------------------------------------------
+|
+| Composer provides a convenient, automatically generated class loader
+| for our application. We just need to utilize it! We'll require it
+| into the script here so that we do not have to worry about the
+| loading of any our classes "manually". Feels great to relax.
+|
+*/
+
+require __DIR__.'/vendor/autoload.php';
+
+$app = require_once __DIR__.'/bootstrap/app.php';
+
+/*
+|--------------------------------------------------------------------------
+| Run The Artisan Application
+|--------------------------------------------------------------------------
+|
+| When we run the console application, the current CLI command will be
+| executed in this console and the response sent back to a terminal
+| or another output device for the developers. Here goes nothing!
+|
+*/
+
+$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
+
+$status = $kernel->handle(
+    $input = new Symfony\Component\Console\Input\ArgvInput,
+    new Symfony\Component\Console\Output\ConsoleOutput
+);
+
+/*
+|--------------------------------------------------------------------------
+| Shutdown The Application
+|--------------------------------------------------------------------------
+|
+| Once Artisan has finished running, we will fire off the shutdown events
+| so that any final work may be done by the application before we shut
+| down the process. This is the last thing to happen to the request.
+|
+*/
+
+$kernel->terminate($input, $status);
+
+exit($status);

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 84 - 0
backup.sql


+ 55 - 0
bootstrap/app.php

@@ -0,0 +1,55 @@
+<?php
+
+/*
+|--------------------------------------------------------------------------
+| Create The Application
+|--------------------------------------------------------------------------
+|
+| The first thing we will do is create a new Laravel application instance
+| which serves as the "glue" for all the components of Laravel, and is
+| the IoC container for the system binding all of the various parts.
+|
+*/
+
+$app = new Illuminate\Foundation\Application(
+    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
+);
+
+/*
+|--------------------------------------------------------------------------
+| Bind Important Interfaces
+|--------------------------------------------------------------------------
+|
+| Next, we need to bind some important interfaces into the container so
+| we will be able to resolve them when needed. The kernels serve the
+| incoming requests to this application from both the web and CLI.
+|
+*/
+
+$app->singleton(
+    Illuminate\Contracts\Http\Kernel::class,
+    App\Http\Kernel::class
+);
+
+$app->singleton(
+    Illuminate\Contracts\Console\Kernel::class,
+    App\Console\Kernel::class
+);
+
+$app->singleton(
+    Illuminate\Contracts\Debug\ExceptionHandler::class,
+    App\Exceptions\Handler::class
+);
+
+/*
+|--------------------------------------------------------------------------
+| Return The Application
+|--------------------------------------------------------------------------
+|
+| This script returns the application instance. The instance is given to
+| the calling script so we can separate the building of the instances
+| from the actual running of the application and sending responses.
+|
+*/
+
+return $app;

+ 2 - 0
bootstrap/cache/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 6206 - 0
composer.lock

@@ -0,0 +1,6206 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+        "This file is @generated automatically"
+    ],
+    "hash": "8347d6f07f6bf1d6e2bfb4ae655494be",
+    "content-hash": "10e131aff347144cb4dc9eccc2f38e50",
+    "packages": [
+        {
+            "name": "abraham/twitteroauth",
+            "version": "1.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/abraham/twitteroauth.git",
+                "reference": "f5cda73d1deae8b9e3e54f1572a6d28d03e06644"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/abraham/twitteroauth/zipball/f5cda73d1deae8b9e3e54f1572a6d28d03e06644",
+                "reference": "f5cda73d1deae8b9e3e54f1572a6d28d03e06644",
+                "shasum": ""
+            },
+            "require": {
+                "composer/ca-bundle": "^1.2",
+                "ext-curl": "*",
+                "php": "^7.2 || ^7.3 || ^7.4"
+            },
+            "require-dev": {
+                "php-vcr/php-vcr": "^1",
+                "php-vcr/phpunit-testlistener-vcr": "^3",
+                "phpmd/phpmd": "^2",
+                "phpunit/phpunit": "^8",
+                "squizlabs/php_codesniffer": "^3"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Abraham\\TwitterOAuth\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Abraham Williams",
+                    "email": "abraham@abrah.am",
+                    "homepage": "https://abrah.am",
+                    "role": "Developer"
+                }
+            ],
+            "description": "The most popular PHP library for use with the Twitter OAuth REST API.",
+            "homepage": "https://twitteroauth.com",
+            "keywords": [
+                "Twitter API",
+                "Twitter oAuth",
+                "api",
+                "oauth",
+                "rest",
+                "social",
+                "twitter"
+            ],
+            "time": "2020-09-22 14:27:00"
+        },
+        {
+            "name": "asm89/stack-cors",
+            "version": "1.3.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/asm89/stack-cors.git",
+                "reference": "b9c31def6a83f84b4d4a40d35996d375755f0e08"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/asm89/stack-cors/zipball/b9c31def6a83f84b4d4a40d35996d375755f0e08",
+                "reference": "b9c31def6a83f84b4d4a40d35996d375755f0e08",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.9",
+                "symfony/http-foundation": "~2.7|~3.0|~4.0|~5.0",
+                "symfony/http-kernel": "~2.7|~3.0|~4.0|~5.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^5.0 || ^4.8.10",
+                "squizlabs/php_codesniffer": "^2.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.2-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Asm89\\Stack\\": "src/Asm89/Stack/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Alexander",
+                    "email": "iam.asm89@gmail.com"
+                }
+            ],
+            "description": "Cross-origin resource sharing library and stack middleware",
+            "homepage": "https://github.com/asm89/stack-cors",
+            "keywords": [
+                "cors",
+                "stack"
+            ],
+            "time": "2019-12-24 22:41:47"
+        },
+        {
+            "name": "brick/math",
+            "version": "0.8.15",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/brick/math.git",
+                "reference": "9b08d412b9da9455b210459ff71414de7e6241cd"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/brick/math/zipball/9b08d412b9da9455b210459ff71414de7e6241cd",
+                "reference": "9b08d412b9da9455b210459ff71414de7e6241cd",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "php": "^7.1|^8.0"
+            },
+            "require-dev": {
+                "php-coveralls/php-coveralls": "^2.2",
+                "phpunit/phpunit": "^7.5.15|^8.5",
+                "vimeo/psalm": "^3.5"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Brick\\Math\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "Arbitrary-precision arithmetic library",
+            "keywords": [
+                "Arbitrary-precision",
+                "BigInteger",
+                "BigRational",
+                "arithmetic",
+                "bigdecimal",
+                "bignum",
+                "brick",
+                "math"
+            ],
+            "time": "2020-04-15 15:59:35"
+        },
+        {
+            "name": "composer/ca-bundle",
+            "version": "1.2.8",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/composer/ca-bundle.git",
+                "reference": "8a7ecad675253e4654ea05505233285377405215"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215",
+                "reference": "8a7ecad675253e4654ea05505233285377405215",
+                "shasum": ""
+            },
+            "require": {
+                "ext-openssl": "*",
+                "ext-pcre": "*",
+                "php": "^5.3.2 || ^7.0 || ^8.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
+                "psr/log": "^1.0",
+                "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Composer\\CaBundle\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jordi Boggiano",
+                    "email": "j.boggiano@seld.be",
+                    "homepage": "http://seld.be"
+                }
+            ],
+            "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
+            "keywords": [
+                "cabundle",
+                "cacert",
+                "certificate",
+                "ssl",
+                "tls"
+            ],
+            "time": "2020-08-23 12:54:47"
+        },
+        {
+            "name": "dnoegel/php-xdg-base-dir",
+            "version": "v0.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/dnoegel/php-xdg-base-dir.git",
+                "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd",
+                "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.2"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "XdgBaseDir\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "implementation of xdg base directory specification for php",
+            "time": "2019-12-04 15:06:13"
+        },
+        {
+            "name": "doctrine/inflector",
+            "version": "2.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/inflector.git",
+                "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210",
+                "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2 || ^8.0"
+            },
+            "require-dev": {
+                "doctrine/coding-standard": "^7.0",
+                "phpstan/phpstan": "^0.11",
+                "phpstan/phpstan-phpunit": "^0.11",
+                "phpstan/phpstan-strict-rules": "^0.11",
+                "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Inflector\\": "lib/Doctrine/Inflector"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Guilherme Blanco",
+                    "email": "guilhermeblanco@gmail.com"
+                },
+                {
+                    "name": "Roman Borschel",
+                    "email": "roman@code-factory.org"
+                },
+                {
+                    "name": "Benjamin Eberlei",
+                    "email": "kontakt@beberlei.de"
+                },
+                {
+                    "name": "Jonathan Wage",
+                    "email": "jonwage@gmail.com"
+                },
+                {
+                    "name": "Johannes Schmitt",
+                    "email": "schmittjoh@gmail.com"
+                }
+            ],
+            "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.",
+            "homepage": "https://www.doctrine-project.org/projects/inflector.html",
+            "keywords": [
+                "inflection",
+                "inflector",
+                "lowercase",
+                "manipulation",
+                "php",
+                "plural",
+                "singular",
+                "strings",
+                "uppercase",
+                "words"
+            ],
+            "time": "2020-05-29 15:13:26"
+        },
+        {
+            "name": "doctrine/lexer",
+            "version": "1.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/lexer.git",
+                "reference": "e864bbf5904cb8f5bb334f99209b48018522f042"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042",
+                "reference": "e864bbf5904cb8f5bb334f99209b48018522f042",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2 || ^8.0"
+            },
+            "require-dev": {
+                "doctrine/coding-standard": "^6.0",
+                "phpstan/phpstan": "^0.11.8",
+                "phpunit/phpunit": "^8.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.2.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Guilherme Blanco",
+                    "email": "guilhermeblanco@gmail.com"
+                },
+                {
+                    "name": "Roman Borschel",
+                    "email": "roman@code-factory.org"
+                },
+                {
+                    "name": "Johannes Schmitt",
+                    "email": "schmittjoh@gmail.com"
+                }
+            ],
+            "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
+            "homepage": "https://www.doctrine-project.org/projects/lexer.html",
+            "keywords": [
+                "annotations",
+                "docblock",
+                "lexer",
+                "parser",
+                "php"
+            ],
+            "time": "2020-05-25 17:44:05"
+        },
+        {
+            "name": "dragonmantank/cron-expression",
+            "version": "v2.3.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/dragonmantank/cron-expression.git",
+                "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/72b6fbf76adb3cf5bc0db68559b33d41219aba27",
+                "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^6.4|^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.3-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Cron\\": "src/Cron/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                },
+                {
+                    "name": "Chris Tankersley",
+                    "email": "chris@ctankersley.com",
+                    "homepage": "https://github.com/dragonmantank"
+                }
+            ],
+            "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due",
+            "keywords": [
+                "cron",
+                "schedule"
+            ],
+            "time": "2019-03-31 00:38:28"
+        },
+        {
+            "name": "egulias/email-validator",
+            "version": "2.1.17",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/egulias/EmailValidator.git",
+                "reference": "ade6887fd9bd74177769645ab5c474824f8a418a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ade6887fd9bd74177769645ab5c474824f8a418a",
+                "reference": "ade6887fd9bd74177769645ab5c474824f8a418a",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/lexer": "^1.0.1",
+                "php": ">=5.5",
+                "symfony/polyfill-intl-idn": "^1.10"
+            },
+            "require-dev": {
+                "dominicsayers/isemail": "^3.0.7",
+                "phpunit/phpunit": "^4.8.36|^7.5.15",
+                "satooshi/php-coveralls": "^1.0.1"
+            },
+            "suggest": {
+                "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Egulias\\EmailValidator\\": "EmailValidator"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Eduardo Gulias Davis"
+                }
+            ],
+            "description": "A library for validating emails against several RFCs",
+            "homepage": "https://github.com/egulias/EmailValidator",
+            "keywords": [
+                "email",
+                "emailvalidation",
+                "emailvalidator",
+                "validation",
+                "validator"
+            ],
+            "time": "2020-02-13 22:36:52"
+        },
+        {
+            "name": "facebook/graph-sdk",
+            "version": "5.7.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/facebook/php-graph-sdk.git",
+                "reference": "2d8250638b33d73e7a87add65f47fabf91f8ad9b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/facebook/php-graph-sdk/zipball/2d8250638b33d73e7a87add65f47fabf91f8ad9b",
+                "reference": "2d8250638b33d73e7a87add65f47fabf91f8ad9b",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.4|^7.0"
+            },
+            "require-dev": {
+                "guzzlehttp/guzzle": "~5.0",
+                "mockery/mockery": "~0.8",
+                "phpunit/phpunit": "~4.0"
+            },
+            "suggest": {
+                "guzzlehttp/guzzle": "Allows for implementation of the Guzzle HTTP client",
+                "paragonie/random_compat": "Provides a better CSPRNG option in PHP 5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Facebook\\": "src/Facebook/"
+                },
+                "files": [
+                    "src/Facebook/polyfills.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Facebook Platform"
+            ],
+            "authors": [
+                {
+                    "name": "Facebook",
+                    "homepage": "https://github.com/facebook/php-graph-sdk/contributors"
+                }
+            ],
+            "description": "Facebook SDK for PHP",
+            "homepage": "https://github.com/facebook/php-graph-sdk",
+            "keywords": [
+                "facebook",
+                "sdk"
+            ],
+            "time": "2018-12-11 22:56:31"
+        },
+        {
+            "name": "fideloper/proxy",
+            "version": "4.3.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/fideloper/TrustedProxy.git",
+                "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a",
+                "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a",
+                "shasum": ""
+            },
+            "require": {
+                "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0",
+                "php": ">=5.4.0"
+            },
+            "require-dev": {
+                "illuminate/http": "^5.0|^6.0|^7.0|^8.0",
+                "mockery/mockery": "^1.0",
+                "phpunit/phpunit": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "Fideloper\\Proxy\\TrustedProxyServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Fideloper\\Proxy\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Chris Fidao",
+                    "email": "fideloper@gmail.com"
+                }
+            ],
+            "description": "Set trusted proxies for Laravel",
+            "keywords": [
+                "load balancing",
+                "proxy",
+                "trusted proxy"
+            ],
+            "time": "2020-02-22 01:51:47"
+        },
+        {
+            "name": "fruitcake/laravel-cors",
+            "version": "v1.0.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/fruitcake/laravel-cors.git",
+                "reference": "1d127dbec313e2e227d65e0c483765d8d7559bf6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/1d127dbec313e2e227d65e0c483765d8d7559bf6",
+                "reference": "1d127dbec313e2e227d65e0c483765d8d7559bf6",
+                "shasum": ""
+            },
+            "require": {
+                "asm89/stack-cors": "^1.3",
+                "illuminate/contracts": "^5.5|^6.0|^7.0|^8.0",
+                "illuminate/support": "^5.5|^6.0|^7.0|^8.0",
+                "php": ">=7",
+                "symfony/http-foundation": "^3.3|^4.0|^5.0",
+                "symfony/http-kernel": "^3.3|^4.0|^5.0"
+            },
+            "require-dev": {
+                "laravel/framework": "^5.5|^6.0|^7.0|^8.0",
+                "orchestra/testbench": "^3.5|^4.0|^5.0|^6.0",
+                "phpro/grumphp": "^0.16|^0.17",
+                "phpunit/phpunit": "^6.0|^7.0|^8.0",
+                "squizlabs/php_codesniffer": "^3.5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                },
+                "laravel": {
+                    "providers": [
+                        "Fruitcake\\Cors\\CorsServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Fruitcake\\Cors\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fruitcake",
+                    "homepage": "https://fruitcake.nl"
+                },
+                {
+                    "name": "Barry vd. Heuvel",
+                    "email": "barryvdh@gmail.com"
+                }
+            ],
+            "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application",
+            "keywords": [
+                "api",
+                "cors",
+                "crossdomain",
+                "laravel"
+            ],
+            "time": "2020-04-28 08:47:37"
+        },
+        {
+            "name": "guzzlehttp/guzzle",
+            "version": "6.5.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/guzzle.git",
+                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
+                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "guzzlehttp/promises": "^1.0",
+                "guzzlehttp/psr7": "^1.6.1",
+                "php": ">=5.5",
+                "symfony/polyfill-intl-idn": "1.17.0"
+            },
+            "require-dev": {
+                "ext-curl": "*",
+                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
+                "psr/log": "^1.1"
+            },
+            "suggest": {
+                "psr/log": "Required for using the Log middleware"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "6.5-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "GuzzleHttp\\": "src/"
+                },
+                "files": [
+                    "src/functions_include.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                }
+            ],
+            "description": "Guzzle is a PHP HTTP client library",
+            "homepage": "http://guzzlephp.org/",
+            "keywords": [
+                "client",
+                "curl",
+                "framework",
+                "http",
+                "http client",
+                "rest",
+                "web service"
+            ],
+            "time": "2020-05-25 19:35:05"
+        },
+        {
+            "name": "guzzlehttp/promises",
+            "version": "v1.3.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/promises.git",
+                "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+                "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.5.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "GuzzleHttp\\Promise\\": "src/"
+                },
+                "files": [
+                    "src/functions_include.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                }
+            ],
+            "description": "Guzzle promises library",
+            "keywords": [
+                "promise"
+            ],
+            "time": "2016-12-20 10:07:11"
+        },
+        {
+            "name": "guzzlehttp/psr7",
+            "version": "1.6.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/guzzle/psr7.git",
+                "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
+                "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.4.0",
+                "psr/http-message": "~1.0",
+                "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
+            },
+            "provide": {
+                "psr/http-message-implementation": "1.0"
+            },
+            "require-dev": {
+                "ext-zlib": "*",
+                "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
+            },
+            "suggest": {
+                "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.6-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "GuzzleHttp\\Psr7\\": "src/"
+                },
+                "files": [
+                    "src/functions_include.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Dowling",
+                    "email": "mtdowling@gmail.com",
+                    "homepage": "https://github.com/mtdowling"
+                },
+                {
+                    "name": "Tobias Schultze",
+                    "homepage": "https://github.com/Tobion"
+                }
+            ],
+            "description": "PSR-7 message implementation that also provides common utility methods",
+            "keywords": [
+                "http",
+                "message",
+                "psr-7",
+                "request",
+                "response",
+                "stream",
+                "uri",
+                "url"
+            ],
+            "time": "2019-07-01 23:21:34"
+        },
+        {
+            "name": "kylewm/brevity",
+            "version": "0.2.10",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/kylewm/brevity-php.git",
+                "reference": "9700a3ca666ff9486bd8bed322d7096ef78b6580"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/kylewm/brevity-php/zipball/9700a3ca666ff9486bd8bed322d7096ef78b6580",
+                "reference": "9700a3ca666ff9486bd8bed322d7096ef78b6580",
+                "shasum": ""
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-0": {
+                    "Kylewm\\Brevity": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "CC0"
+            ],
+            "authors": [
+                {
+                    "name": "Kyle Mahan",
+                    "email": "kyle+brevityphp@kylewm.com"
+                }
+            ],
+            "description": "A small utility to count characters and shorten posts to tweet-length.",
+            "time": "2017-11-25 19:51:26"
+        },
+        {
+            "name": "laravel-notification-channels/facebook-poster",
+            "version": "3.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laravel-notification-channels/facebook-poster.git",
+                "reference": "3666d989cb7839d64c66ee27d5fec687895aecd7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laravel-notification-channels/facebook-poster/zipball/3666d989cb7839d64c66ee27d5fec687895aecd7",
+                "reference": "3666d989cb7839d64c66ee27d5fec687895aecd7",
+                "shasum": ""
+            },
+            "require": {
+                "facebook/graph-sdk": "^5.7",
+                "illuminate/notifications": "^7.0",
+                "illuminate/support": "^7.0",
+                "php": "^7.2.5"
+            },
+            "require-dev": {
+                "mockery/mockery": "^1.3.1",
+                "orchestra/testbench": "~5.0",
+                "phpunit/phpunit": "~8.0"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "NotificationChannels\\FacebookPoster\\FacebookPosterServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "NotificationChannels\\FacebookPoster\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Ahmed Ashraf",
+                    "email": "ahmed29329@gmail.com"
+                }
+            ],
+            "description": "Use notification to create posts on Facebook",
+            "time": "2020-03-03 22:03:27"
+        },
+        {
+            "name": "laravel-notification-channels/twitter",
+            "version": "v4.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laravel-notification-channels/twitter.git",
+                "reference": "a9490fa02a572992baddef6f231b2d4d2d98af5d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laravel-notification-channels/twitter/zipball/a9490fa02a572992baddef6f231b2d4d2d98af5d",
+                "reference": "a9490fa02a572992baddef6f231b2d4d2d98af5d",
+                "shasum": ""
+            },
+            "require": {
+                "abraham/twitteroauth": "^1.0.0",
+                "illuminate/notifications": "^7.0",
+                "illuminate/support": "^7.0",
+                "kylewm/brevity": "^0.2.9",
+                "php": "^7.2.5"
+            },
+            "require-dev": {
+                "mockery/mockery": "^1.3.1",
+                "orchestra/testbench": "~5.0",
+                "phpunit/phpunit": "^8.0"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "NotificationChannels\\Twitter\\TwitterServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "NotificationChannels\\Twitter\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Christoph Rumpel",
+                    "email": "c.rumpel@kabsi.at",
+                    "homepage": "https://christoph-rumpel.com",
+                    "role": "Developer"
+                }
+            ],
+            "description": "This package makes it easy to send notifications via Twitter with Laravel",
+            "homepage": "https://github.com/laravel-notification-channels/twitter",
+            "time": "2020-08-05 06:15:26"
+        },
+        {
+            "name": "laravel/framework",
+            "version": "v7.14.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laravel/framework.git",
+                "reference": "469b7719a8dca40841a74f59f2e9f30f01d3a106"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laravel/framework/zipball/469b7719a8dca40841a74f59f2e9f30f01d3a106",
+                "reference": "469b7719a8dca40841a74f59f2e9f30f01d3a106",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/inflector": "^1.4|^2.0",
+                "dragonmantank/cron-expression": "^2.0",
+                "egulias/email-validator": "^2.1.10",
+                "ext-json": "*",
+                "ext-mbstring": "*",
+                "ext-openssl": "*",
+                "league/commonmark": "^1.3",
+                "league/flysystem": "^1.0.34",
+                "monolog/monolog": "^2.0",
+                "nesbot/carbon": "^2.17",
+                "opis/closure": "^3.1",
+                "php": "^7.2.5",
+                "psr/container": "^1.0",
+                "psr/simple-cache": "^1.0",
+                "ramsey/uuid": "^3.7|^4.0",
+                "swiftmailer/swiftmailer": "^6.0",
+                "symfony/console": "^5.0",
+                "symfony/error-handler": "^5.0",
+                "symfony/finder": "^5.0",
+                "symfony/http-foundation": "^5.0",
+                "symfony/http-kernel": "^5.0",
+                "symfony/mime": "^5.0",
+                "symfony/polyfill-php73": "^1.17",
+                "symfony/process": "^5.0",
+                "symfony/routing": "^5.0",
+                "symfony/var-dumper": "^5.0",
+                "tijsverkoyen/css-to-inline-styles": "^2.2.2",
+                "vlucas/phpdotenv": "^4.0",
+                "voku/portable-ascii": "^1.4.8"
+            },
+            "conflict": {
+                "tightenco/collect": "<5.5.33"
+            },
+            "provide": {
+                "psr/container-implementation": "1.0"
+            },
+            "replace": {
+                "illuminate/auth": "self.version",
+                "illuminate/broadcasting": "self.version",
+                "illuminate/bus": "self.version",
+                "illuminate/cache": "self.version",
+                "illuminate/config": "self.version",
+                "illuminate/console": "self.version",
+                "illuminate/container": "self.version",
+                "illuminate/contracts": "self.version",
+                "illuminate/cookie": "self.version",
+                "illuminate/database": "self.version",
+                "illuminate/encryption": "self.version",
+                "illuminate/events": "self.version",
+                "illuminate/filesystem": "self.version",
+                "illuminate/hashing": "self.version",
+                "illuminate/http": "self.version",
+                "illuminate/log": "self.version",
+                "illuminate/mail": "self.version",
+                "illuminate/notifications": "self.version",
+                "illuminate/pagination": "self.version",
+                "illuminate/pipeline": "self.version",
+                "illuminate/queue": "self.version",
+                "illuminate/redis": "self.version",
+                "illuminate/routing": "self.version",
+                "illuminate/session": "self.version",
+                "illuminate/support": "self.version",
+                "illuminate/testing": "self.version",
+                "illuminate/translation": "self.version",
+                "illuminate/validation": "self.version",
+                "illuminate/view": "self.version"
+            },
+            "require-dev": {
+                "aws/aws-sdk-php": "^3.0",
+                "doctrine/dbal": "^2.6",
+                "filp/whoops": "^2.4",
+                "guzzlehttp/guzzle": "^6.3.1|^7.0",
+                "league/flysystem-cached-adapter": "^1.0",
+                "mockery/mockery": "^1.3.1",
+                "moontoast/math": "^1.1",
+                "orchestra/testbench-core": "^5.0",
+                "pda/pheanstalk": "^4.0",
+                "phpunit/phpunit": "^8.4|^9.0",
+                "predis/predis": "^1.1.1",
+                "symfony/cache": "^5.0"
+            },
+            "suggest": {
+                "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).",
+                "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
+                "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().",
+                "ext-memcached": "Required to use the memcache cache driver.",
+                "ext-pcntl": "Required to use all features of the queue worker.",
+                "ext-posix": "Required to use all features of the queue worker.",
+                "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).",
+                "filp/whoops": "Required for friendly error pages in development (^2.4).",
+                "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).",
+                "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0).",
+                "laravel/tinker": "Required to use the tinker console command (^2.0).",
+                "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).",
+                "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).",
+                "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).",
+                "mockery/mockery": "Required to use mocking (^1.3.1).",
+                "moontoast/math": "Required to use ordered UUIDs (^1.1).",
+                "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).",
+                "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).",
+                "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.0).",
+                "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
+                "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).",
+                "symfony/cache": "Required to PSR-6 cache bridge (^5.0).",
+                "symfony/filesystem": "Required to create relative storage directory symbolic links (^5.0).",
+                "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).",
+                "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)."
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "7.x-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/Illuminate/Foundation/helpers.php",
+                    "src/Illuminate/Support/helpers.php"
+                ],
+                "psr-4": {
+                    "Illuminate\\": "src/Illuminate/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Taylor Otwell",
+                    "email": "taylor@laravel.com"
+                }
+            ],
+            "description": "The Laravel Framework.",
+            "homepage": "https://laravel.com",
+            "keywords": [
+                "framework",
+                "laravel"
+            ],
+            "time": "2020-06-02 22:34:18"
+        },
+        {
+            "name": "laravel/tinker",
+            "version": "v2.4.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laravel/tinker.git",
+                "reference": "cde90a7335a2130a4488beb68f4b2141869241db"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laravel/tinker/zipball/cde90a7335a2130a4488beb68f4b2141869241db",
+                "reference": "cde90a7335a2130a4488beb68f4b2141869241db",
+                "shasum": ""
+            },
+            "require": {
+                "illuminate/console": "^6.0|^7.0|^8.0",
+                "illuminate/contracts": "^6.0|^7.0|^8.0",
+                "illuminate/support": "^6.0|^7.0|^8.0",
+                "php": "^7.2",
+                "psy/psysh": "^0.10.3",
+                "symfony/var-dumper": "^4.3|^5.0"
+            },
+            "require-dev": {
+                "mockery/mockery": "^1.3.1",
+                "phpunit/phpunit": "^8.4|^9.0"
+            },
+            "suggest": {
+                "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0)."
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.x-dev"
+                },
+                "laravel": {
+                    "providers": [
+                        "Laravel\\Tinker\\TinkerServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Laravel\\Tinker\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Taylor Otwell",
+                    "email": "taylor@laravel.com"
+                }
+            ],
+            "description": "Powerful REPL for the Laravel framework.",
+            "keywords": [
+                "REPL",
+                "Tinker",
+                "laravel",
+                "psysh"
+            ],
+            "time": "2020-04-07 15:01:31"
+        },
+        {
+            "name": "laravelcollective/html",
+            "version": "v6.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/LaravelCollective/html.git",
+                "reference": "5ef9a3c9ae2423fe5618996f3cde375d461a3fc6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/LaravelCollective/html/zipball/5ef9a3c9ae2423fe5618996f3cde375d461a3fc6",
+                "reference": "5ef9a3c9ae2423fe5618996f3cde375d461a3fc6",
+                "shasum": ""
+            },
+            "require": {
+                "illuminate/http": "^6.0|^7.0",
+                "illuminate/routing": "^6.0|^7.0",
+                "illuminate/session": "^6.0|^7.0",
+                "illuminate/support": "^6.0|^7.0",
+                "illuminate/view": "^6.0|^7.0",
+                "php": ">=7.2.5"
+            },
+            "require-dev": {
+                "illuminate/database": "^6.0|^7.0",
+                "mockery/mockery": "~1.0",
+                "phpunit/phpunit": "~7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "6.0-dev"
+                },
+                "laravel": {
+                    "providers": [
+                        "Collective\\Html\\HtmlServiceProvider"
+                    ],
+                    "aliases": {
+                        "Form": "Collective\\Html\\FormFacade",
+                        "Html": "Collective\\Html\\HtmlFacade"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Collective\\Html\\": "src/"
+                },
+                "files": [
+                    "src/helpers.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Adam Engebretson",
+                    "email": "adam@laravelcollective.com"
+                },
+                {
+                    "name": "Taylor Otwell",
+                    "email": "taylorotwell@gmail.com"
+                }
+            ],
+            "description": "HTML and Form Builders for the Laravel Framework",
+            "homepage": "https://laravelcollective.com",
+            "time": "2020-05-19 18:02:16"
+        },
+        {
+            "name": "laravelium/sitemap",
+            "version": "v7.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Laravelium/laravel-sitemap.git",
+                "reference": "9326fc2452d0de95327fb85a7f7119213c660942"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Laravelium/laravel-sitemap/zipball/9326fc2452d0de95327fb85a7f7119213c660942",
+                "reference": "9326fc2452d0de95327fb85a7f7119213c660942",
+                "shasum": ""
+            },
+            "require": {
+                "illuminate/filesystem": "~7.0",
+                "illuminate/support": "~7.0",
+                "php": ">=7.2"
+            },
+            "require-dev": {
+                "laravel/framework": "~7.0",
+                "orchestra/testbench-core": "~5.0",
+                "phpunit/phpunit": "^8.0"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "Laravelium\\Sitemap\\SitemapServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Laravelium\\Sitemap": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Rumen Damyanov",
+                    "email": "r@alfamatter.com",
+                    "homepage": "https://darumen.com",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Laravelium Sitemap package for Laravel.",
+            "homepage": "https://gitlab.com/Laravelium",
+            "keywords": [
+                "Sitemap",
+                "generator",
+                "google-news",
+                "html",
+                "laravel",
+                "laravelium",
+                "php",
+                "xml"
+            ],
+            "time": "2020-03-21 19:06:08"
+        },
+        {
+            "name": "league/commonmark",
+            "version": "1.4.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/commonmark.git",
+                "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/412639f7cfbc0b31ad2455b2fe965095f66ae505",
+                "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505",
+                "shasum": ""
+            },
+            "require": {
+                "ext-mbstring": "*",
+                "php": "^7.1"
+            },
+            "conflict": {
+                "scrutinizer/ocular": "1.7.*"
+            },
+            "require-dev": {
+                "cebe/markdown": "~1.0",
+                "commonmark/commonmark.js": "0.29.1",
+                "erusev/parsedown": "~1.0",
+                "ext-json": "*",
+                "github/gfm": "0.29.0",
+                "michelf/php-markdown": "~1.4",
+                "mikehaertl/php-shellcommand": "^1.4",
+                "phpstan/phpstan": "^0.12",
+                "phpunit/phpunit": "^7.5",
+                "scrutinizer/ocular": "^1.5",
+                "symfony/finder": "^4.2"
+            },
+            "bin": [
+                "bin/commonmark"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "League\\CommonMark\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Colin O'Dell",
+                    "email": "colinodell@gmail.com",
+                    "homepage": "https://www.colinodell.com",
+                    "role": "Lead Developer"
+                }
+            ],
+            "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)",
+            "homepage": "https://commonmark.thephpleague.com",
+            "keywords": [
+                "commonmark",
+                "flavored",
+                "gfm",
+                "github",
+                "github-flavored",
+                "markdown",
+                "md",
+                "parser"
+            ],
+            "time": "2020-05-04 22:15:21"
+        },
+        {
+            "name": "league/flysystem",
+            "version": "1.0.69",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/thephpleague/flysystem.git",
+                "reference": "7106f78428a344bc4f643c233a94e48795f10967"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967",
+                "reference": "7106f78428a344bc4f643c233a94e48795f10967",
+                "shasum": ""
+            },
+            "require": {
+                "ext-fileinfo": "*",
+                "php": ">=5.5.9"
+            },
+            "conflict": {
+                "league/flysystem-sftp": "<1.0.6"
+            },
+            "require-dev": {
+                "phpspec/phpspec": "^3.4",
+                "phpunit/phpunit": "^5.7.26"
+            },
+            "suggest": {
+                "ext-fileinfo": "Required for MimeType",
+                "ext-ftp": "Allows you to use FTP server storage",
+                "ext-openssl": "Allows you to use FTPS server storage",
+                "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
+                "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
+                "league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
+                "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
+                "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
+                "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
+                "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
+                "league/flysystem-webdav": "Allows you to use WebDAV storage",
+                "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
+                "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
+                "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "League\\Flysystem\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Frank de Jonge",
+                    "email": "info@frenky.net"
+                }
+            ],
+            "description": "Filesystem abstraction: Many filesystems, one API.",
+            "keywords": [
+                "Cloud Files",
+                "WebDAV",
+                "abstraction",
+                "aws",
+                "cloud",
+                "copy.com",
+                "dropbox",
+                "file systems",
+                "files",
+                "filesystem",
+                "filesystems",
+                "ftp",
+                "rackspace",
+                "remote",
+                "s3",
+                "sftp",
+                "storage"
+            ],
+            "time": "2020-05-18 15:13:39"
+        },
+        {
+            "name": "monolog/monolog",
+            "version": "2.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Seldaek/monolog.git",
+                "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1",
+                "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2",
+                "psr/log": "^1.0.1"
+            },
+            "provide": {
+                "psr/log-implementation": "1.0.0"
+            },
+            "require-dev": {
+                "aws/aws-sdk-php": "^2.4.9 || ^3.0",
+                "doctrine/couchdb": "~1.0@dev",
+                "elasticsearch/elasticsearch": "^6.0",
+                "graylog2/gelf-php": "^1.4.2",
+                "php-amqplib/php-amqplib": "~2.4",
+                "php-console/php-console": "^3.1.3",
+                "php-parallel-lint/php-parallel-lint": "^1.0",
+                "phpspec/prophecy": "^1.6.1",
+                "phpunit/phpunit": "^8.5",
+                "predis/predis": "^1.1",
+                "rollbar/rollbar": "^1.3",
+                "ruflin/elastica": ">=0.90 <3.0",
+                "swiftmailer/swiftmailer": "^5.3|^6.0"
+            },
+            "suggest": {
+                "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
+                "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
+                "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
+                "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
+                "ext-mbstring": "Allow to work properly with unicode symbols",
+                "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
+                "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
+                "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
+                "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
+                "php-console/php-console": "Allow sending log messages to Google Chrome",
+                "rollbar/rollbar": "Allow sending log messages to Rollbar",
+                "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Monolog\\": "src/Monolog"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jordi Boggiano",
+                    "email": "j.boggiano@seld.be",
+                    "homepage": "http://seld.be"
+                }
+            ],
+            "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
+            "homepage": "http://github.com/Seldaek/monolog",
+            "keywords": [
+                "log",
+                "logging",
+                "psr-3"
+            ],
+            "time": "2020-05-22 08:12:19"
+        },
+        {
+            "name": "nesbot/carbon",
+            "version": "2.35.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/briannesbitt/Carbon.git",
+                "reference": "4b9bd835261ef23d36397a46a76b496a458305e5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4b9bd835261ef23d36397a46a76b496a458305e5",
+                "reference": "4b9bd835261ef23d36397a46a76b496a458305e5",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "php": "^7.1.8 || ^8.0",
+                "symfony/polyfill-mbstring": "^1.0",
+                "symfony/translation": "^3.4 || ^4.0 || ^5.0"
+            },
+            "require-dev": {
+                "doctrine/orm": "^2.7",
+                "friendsofphp/php-cs-fixer": "^2.14 || ^3.0",
+                "kylekatarnls/multi-tester": "^1.1",
+                "phpmd/phpmd": "^2.8",
+                "phpstan/phpstan": "^0.11",
+                "phpunit/phpunit": "^7.5 || ^8.0",
+                "squizlabs/php_codesniffer": "^3.4"
+            },
+            "bin": [
+                "bin/carbon"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.x-dev",
+                    "dev-3.x": "3.x-dev"
+                },
+                "laravel": {
+                    "providers": [
+                        "Carbon\\Laravel\\ServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Carbon\\": "src/Carbon/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Brian Nesbitt",
+                    "email": "brian@nesbot.com",
+                    "homepage": "http://nesbot.com"
+                },
+                {
+                    "name": "kylekatarnls",
+                    "homepage": "http://github.com/kylekatarnls"
+                }
+            ],
+            "description": "An API extension for DateTime that supports 281 different languages.",
+            "homepage": "http://carbon.nesbot.com",
+            "keywords": [
+                "date",
+                "datetime",
+                "time"
+            ],
+            "time": "2020-05-24 18:27:52"
+        },
+        {
+            "name": "nikic/php-parser",
+            "version": "v4.5.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/nikic/PHP-Parser.git",
+                "reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/53c2753d756f5adb586dca79c2ec0e2654dd9463",
+                "reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463",
+                "shasum": ""
+            },
+            "require": {
+                "ext-tokenizer": "*",
+                "php": ">=7.0"
+            },
+            "require-dev": {
+                "ircmaxell/php-yacc": "0.0.5",
+                "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0"
+            },
+            "bin": [
+                "bin/php-parse"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.3-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "PhpParser\\": "lib/PhpParser"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Nikita Popov"
+                }
+            ],
+            "description": "A PHP parser written in PHP",
+            "keywords": [
+                "parser",
+                "php"
+            ],
+            "time": "2020-06-03 07:24:19"
+        },
+        {
+            "name": "opis/closure",
+            "version": "3.5.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/opis/closure.git",
+                "reference": "cac47092144043d5d676e2e7cf8d0d2f83fc89ca"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/opis/closure/zipball/cac47092144043d5d676e2e7cf8d0d2f83fc89ca",
+                "reference": "cac47092144043d5d676e2e7cf8d0d2f83fc89ca",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.4 || ^7.0"
+            },
+            "require-dev": {
+                "jeremeamia/superclosure": "^2.0",
+                "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.5.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Opis\\Closure\\": "src/"
+                },
+                "files": [
+                    "functions.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Marius Sarca",
+                    "email": "marius.sarca@gmail.com"
+                },
+                {
+                    "name": "Sorin Sarca",
+                    "email": "sarca_sorin@hotmail.com"
+                }
+            ],
+            "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.",
+            "homepage": "https://opis.io/closure",
+            "keywords": [
+                "anonymous functions",
+                "closure",
+                "function",
+                "serializable",
+                "serialization",
+                "serialize"
+            ],
+            "time": "2020-05-25 09:32:45"
+        },
+        {
+            "name": "phpoption/phpoption",
+            "version": "1.7.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/schmittjoh/php-option.git",
+                "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae",
+                "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.5.9 || ^7.0 || ^8.0"
+            },
+            "require-dev": {
+                "bamarni/composer-bin-plugin": "^1.3",
+                "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.7-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "PhpOption\\": "src/PhpOption/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "authors": [
+                {
+                    "name": "Johannes M. Schmitt",
+                    "email": "schmittjoh@gmail.com"
+                },
+                {
+                    "name": "Graham Campbell",
+                    "email": "graham@alt-three.com"
+                }
+            ],
+            "description": "Option Type for PHP",
+            "keywords": [
+                "language",
+                "option",
+                "php",
+                "type"
+            ],
+            "time": "2020-03-21 18:07:53"
+        },
+        {
+            "name": "psr/container",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/container.git",
+                "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+                "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Container\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common Container Interface (PHP FIG PSR-11)",
+            "homepage": "https://github.com/php-fig/container",
+            "keywords": [
+                "PSR-11",
+                "container",
+                "container-interface",
+                "container-interop",
+                "psr"
+            ],
+            "time": "2017-02-14 16:28:37"
+        },
+        {
+            "name": "psr/event-dispatcher",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/event-dispatcher.git",
+                "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
+                "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\EventDispatcher\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Standard interfaces for event handling.",
+            "keywords": [
+                "events",
+                "psr",
+                "psr-14"
+            ],
+            "time": "2019-01-08 18:20:26"
+        },
+        {
+            "name": "psr/http-message",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/http-message.git",
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
+                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Http\\Message\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for HTTP messages",
+            "homepage": "https://github.com/php-fig/http-message",
+            "keywords": [
+                "http",
+                "http-message",
+                "psr",
+                "psr-7",
+                "request",
+                "response"
+            ],
+            "time": "2016-08-06 14:39:51"
+        },
+        {
+            "name": "psr/log",
+            "version": "1.1.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/log.git",
+                "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
+                "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Log\\": "Psr/Log/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for logging libraries",
+            "homepage": "https://github.com/php-fig/log",
+            "keywords": [
+                "log",
+                "psr",
+                "psr-3"
+            ],
+            "time": "2020-03-23 09:12:05"
+        },
+        {
+            "name": "psr/simple-cache",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/simple-cache.git",
+                "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+                "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\SimpleCache\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interfaces for simple caching",
+            "keywords": [
+                "cache",
+                "caching",
+                "psr",
+                "psr-16",
+                "simple-cache"
+            ],
+            "time": "2017-10-23 01:57:42"
+        },
+        {
+            "name": "psy/psysh",
+            "version": "v0.10.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/bobthecow/psysh.git",
+                "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560",
+                "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560",
+                "shasum": ""
+            },
+            "require": {
+                "dnoegel/php-xdg-base-dir": "0.1.*",
+                "ext-json": "*",
+                "ext-tokenizer": "*",
+                "nikic/php-parser": "~4.0|~3.0|~2.0|~1.3",
+                "php": "^8.0 || ^7.0 || ^5.5.9",
+                "symfony/console": "~5.0|~4.0|~3.0|^2.4.2|~2.3.10",
+                "symfony/var-dumper": "~5.0|~4.0|~3.0|~2.7"
+            },
+            "require-dev": {
+                "bamarni/composer-bin-plugin": "^1.2",
+                "hoa/console": "3.17.*"
+            },
+            "suggest": {
+                "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)",
+                "ext-pdo-sqlite": "The doc command requires SQLite to work.",
+                "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.",
+                "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.",
+                "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit."
+            },
+            "bin": [
+                "bin/psysh"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "0.10.x-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "src/functions.php"
+                ],
+                "psr-4": {
+                    "Psy\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Justin Hileman",
+                    "email": "justin@justinhileman.info",
+                    "homepage": "http://justinhileman.com"
+                }
+            ],
+            "description": "An interactive shell for modern PHP.",
+            "homepage": "http://psysh.org",
+            "keywords": [
+                "REPL",
+                "console",
+                "interactive",
+                "shell"
+            ],
+            "time": "2020-05-03 19:32:03"
+        },
+        {
+            "name": "ralouphie/getallheaders",
+            "version": "3.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/ralouphie/getallheaders.git",
+                "reference": "120b605dfeb996808c31b6477290a714d356e822"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
+                "reference": "120b605dfeb996808c31b6477290a714d356e822",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.6"
+            },
+            "require-dev": {
+                "php-coveralls/php-coveralls": "^2.1",
+                "phpunit/phpunit": "^5 || ^6.5"
+            },
+            "type": "library",
+            "autoload": {
+                "files": [
+                    "src/getallheaders.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Ralph Khattar",
+                    "email": "ralph.khattar@gmail.com"
+                }
+            ],
+            "description": "A polyfill for getallheaders.",
+            "time": "2019-03-08 08:55:37"
+        },
+        {
+            "name": "ramsey/collection",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/ramsey/collection.git",
+                "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/ramsey/collection/zipball/925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca",
+                "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2"
+            },
+            "require-dev": {
+                "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
+                "fzaninotto/faker": "^1.5",
+                "jakub-onderka/php-parallel-lint": "^1",
+                "jangregor/phpstan-prophecy": "^0.6",
+                "mockery/mockery": "^1.3",
+                "phpstan/extension-installer": "^1",
+                "phpstan/phpdoc-parser": "0.4.1",
+                "phpstan/phpstan": "^0.12",
+                "phpstan/phpstan-mockery": "^0.12",
+                "phpstan/phpstan-phpunit": "^0.12",
+                "phpunit/phpunit": "^8.5",
+                "slevomat/coding-standard": "^6.0",
+                "squizlabs/php_codesniffer": "^3.5"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Ramsey\\Collection\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Ben Ramsey",
+                    "email": "ben@benramsey.com",
+                    "homepage": "https://benramsey.com"
+                }
+            ],
+            "description": "A PHP 7.2+ library for representing and manipulating collections.",
+            "homepage": "https://github.com/ramsey/collection",
+            "keywords": [
+                "array",
+                "collection",
+                "hash",
+                "map",
+                "queue",
+                "set"
+            ],
+            "time": "2020-01-05 00:22:59"
+        },
+        {
+            "name": "ramsey/uuid",
+            "version": "4.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/ramsey/uuid.git",
+                "reference": "ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/ramsey/uuid/zipball/ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d",
+                "reference": "ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d",
+                "shasum": ""
+            },
+            "require": {
+                "brick/math": "^0.8",
+                "ext-json": "*",
+                "php": "^7.2 || ^8",
+                "ramsey/collection": "^1.0",
+                "symfony/polyfill-ctype": "^1.8"
+            },
+            "replace": {
+                "rhumsaa/uuid": "self.version"
+            },
+            "require-dev": {
+                "codeception/aspect-mock": "^3",
+                "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2",
+                "doctrine/annotations": "^1.8",
+                "goaop/framework": "^2",
+                "mockery/mockery": "^1.3",
+                "moontoast/math": "^1.1",
+                "paragonie/random-lib": "^2",
+                "php-mock/php-mock-mockery": "^1.3",
+                "php-mock/php-mock-phpunit": "^2.5",
+                "php-parallel-lint/php-parallel-lint": "^1.1",
+                "phpstan/extension-installer": "^1.0",
+                "phpstan/phpdoc-parser": "0.4.3",
+                "phpstan/phpstan": "^0.12",
+                "phpstan/phpstan-mockery": "^0.12",
+                "phpstan/phpstan-phpunit": "^0.12",
+                "phpunit/phpunit": "^8.5",
+                "psy/psysh": "^0.10.0",
+                "slevomat/coding-standard": "^6.0",
+                "squizlabs/php_codesniffer": "^3.5",
+                "vimeo/psalm": "3.9.4"
+            },
+            "suggest": {
+                "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
+                "ext-ctype": "Enables faster processing of character classification using ctype functions.",
+                "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.",
+                "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.",
+                "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
+                "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Ramsey\\Uuid\\": "src/"
+                },
+                "files": [
+                    "src/functions.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).",
+            "homepage": "https://github.com/ramsey/uuid",
+            "keywords": [
+                "guid",
+                "identifier",
+                "uuid"
+            ],
+            "time": "2020-03-29 20:13:32"
+        },
+        {
+            "name": "swiftmailer/swiftmailer",
+            "version": "v6.2.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/swiftmailer/swiftmailer.git",
+                "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9",
+                "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9",
+                "shasum": ""
+            },
+            "require": {
+                "egulias/email-validator": "~2.0",
+                "php": ">=7.0.0",
+                "symfony/polyfill-iconv": "^1.0",
+                "symfony/polyfill-intl-idn": "^1.10",
+                "symfony/polyfill-mbstring": "^1.0"
+            },
+            "require-dev": {
+                "mockery/mockery": "~0.9.1",
+                "symfony/phpunit-bridge": "^3.4.19|^4.1.8"
+            },
+            "suggest": {
+                "ext-intl": "Needed to support internationalized email addresses",
+                "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "6.2-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "lib/swift_required.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Chris Corbyn"
+                },
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                }
+            ],
+            "description": "Swiftmailer, free feature-rich PHP mailer",
+            "homepage": "https://swiftmailer.symfony.com",
+            "keywords": [
+                "email",
+                "mail",
+                "mailer"
+            ],
+            "time": "2019-11-12 09:31:26"
+        },
+        {
+            "name": "symfony/console",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/console.git",
+                "reference": "00bed125812716d09b163f0727ef33bb49bf3448"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/console/zipball/00bed125812716d09b163f0727ef33bb49bf3448",
+                "reference": "00bed125812716d09b163f0727ef33bb49bf3448",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "symfony/polyfill-mbstring": "~1.0",
+                "symfony/polyfill-php73": "^1.8",
+                "symfony/polyfill-php80": "^1.15",
+                "symfony/service-contracts": "^1.1|^2",
+                "symfony/string": "^5.1"
+            },
+            "conflict": {
+                "symfony/dependency-injection": "<4.4",
+                "symfony/dotenv": "<5.1",
+                "symfony/event-dispatcher": "<4.4",
+                "symfony/lock": "<4.4",
+                "symfony/process": "<4.4"
+            },
+            "provide": {
+                "psr/log-implementation": "1.0"
+            },
+            "require-dev": {
+                "psr/log": "~1.0",
+                "symfony/config": "^4.4|^5.0",
+                "symfony/dependency-injection": "^4.4|^5.0",
+                "symfony/event-dispatcher": "^4.4|^5.0",
+                "symfony/lock": "^4.4|^5.0",
+                "symfony/process": "^4.4|^5.0",
+                "symfony/var-dumper": "^4.4|^5.0"
+            },
+            "suggest": {
+                "psr/log": "For using the console logger",
+                "symfony/event-dispatcher": "",
+                "symfony/lock": "",
+                "symfony/process": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Console\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Console Component",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-30 20:35:19"
+        },
+        {
+            "name": "symfony/css-selector",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/css-selector.git",
+                "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9",
+                "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\CssSelector\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Jean-François Simon",
+                    "email": "jeanfrancois.simon@sensiolabs.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony CssSelector Component",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-20 17:43:50"
+        },
+        {
+            "name": "symfony/deprecation-contracts",
+            "version": "v2.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/deprecation-contracts.git",
+                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
+                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.1-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "function.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "A generic function and convention to trigger deprecation notices",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-27 08:34:37"
+        },
+        {
+            "name": "symfony/error-handler",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/error-handler.git",
+                "reference": "7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/error-handler/zipball/7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896",
+                "reference": "7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "psr/log": "^1.0",
+                "symfony/polyfill-php80": "^1.15",
+                "symfony/var-dumper": "^4.4|^5.0"
+            },
+            "require-dev": {
+                "symfony/deprecation-contracts": "^2.1",
+                "symfony/http-kernel": "^4.4|^5.0",
+                "symfony/serializer": "^4.4|^5.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\ErrorHandler\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony ErrorHandler Component",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-30 20:35:19"
+        },
+        {
+            "name": "symfony/event-dispatcher",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/event-dispatcher.git",
+                "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cc0d059e2e997e79ca34125a52f3e33de4424ac7",
+                "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "symfony/deprecation-contracts": "^2.1",
+                "symfony/event-dispatcher-contracts": "^2",
+                "symfony/polyfill-php80": "^1.15"
+            },
+            "conflict": {
+                "symfony/dependency-injection": "<4.4"
+            },
+            "provide": {
+                "psr/event-dispatcher-implementation": "1.0",
+                "symfony/event-dispatcher-implementation": "2.0"
+            },
+            "require-dev": {
+                "psr/log": "~1.0",
+                "symfony/config": "^4.4|^5.0",
+                "symfony/dependency-injection": "^4.4|^5.0",
+                "symfony/expression-language": "^4.4|^5.0",
+                "symfony/http-foundation": "^4.4|^5.0",
+                "symfony/service-contracts": "^1.1|^2",
+                "symfony/stopwatch": "^4.4|^5.0"
+            },
+            "suggest": {
+                "symfony/dependency-injection": "",
+                "symfony/http-kernel": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\EventDispatcher\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony EventDispatcher Component",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-20 17:43:50"
+        },
+        {
+            "name": "symfony/event-dispatcher-contracts",
+            "version": "v2.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/event-dispatcher-contracts.git",
+                "reference": "405952c4e90941a17e52ef7489a2bd94870bb290"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/405952c4e90941a17e52ef7489a2bd94870bb290",
+                "reference": "405952c4e90941a17e52ef7489a2bd94870bb290",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "psr/event-dispatcher": "^1"
+            },
+            "suggest": {
+                "symfony/event-dispatcher-implementation": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Contracts\\EventDispatcher\\": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Generic abstractions related to dispatching event",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "abstractions",
+                "contracts",
+                "decoupling",
+                "interfaces",
+                "interoperability",
+                "standards"
+            ],
+            "time": "2020-05-20 17:43:50"
+        },
+        {
+            "name": "symfony/finder",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/finder.git",
+                "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187",
+                "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Finder\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Finder Component",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-20 17:43:50"
+        },
+        {
+            "name": "symfony/http-foundation",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/http-foundation.git",
+                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
+                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "symfony/deprecation-contracts": "^2.1",
+                "symfony/polyfill-mbstring": "~1.1",
+                "symfony/polyfill-php80": "^1.15"
+            },
+            "require-dev": {
+                "predis/predis": "~1.0",
+                "symfony/cache": "^4.4|^5.0",
+                "symfony/expression-language": "^4.4|^5.0",
+                "symfony/mime": "^4.4|^5.0"
+            },
+            "suggest": {
+                "symfony/mime": "To use the file extension guesser"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\HttpFoundation\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony HttpFoundation Component",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-24 12:18:07"
+        },
+        {
+            "name": "symfony/http-kernel",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/http-kernel.git",
+                "reference": "75ff5327a7d6ede3ccc2fac3ebca9ed776b3e85c"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/http-kernel/zipball/75ff5327a7d6ede3ccc2fac3ebca9ed776b3e85c",
+                "reference": "75ff5327a7d6ede3ccc2fac3ebca9ed776b3e85c",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "psr/log": "~1.0",
+                "symfony/deprecation-contracts": "^2.1",
+                "symfony/error-handler": "^4.4|^5.0",
+                "symfony/event-dispatcher": "^5.0",
+                "symfony/http-foundation": "^4.4|^5.0",
+                "symfony/polyfill-ctype": "^1.8",
+                "symfony/polyfill-php73": "^1.9",
+                "symfony/polyfill-php80": "^1.15"
+            },
+            "conflict": {
+                "symfony/browser-kit": "<4.4",
+                "symfony/cache": "<5.0",
+                "symfony/config": "<5.0",
+                "symfony/console": "<4.4",
+                "symfony/dependency-injection": "<4.4",
+                "symfony/doctrine-bridge": "<5.0",
+                "symfony/form": "<5.0",
+                "symfony/http-client": "<5.0",
+                "symfony/mailer": "<5.0",
+                "symfony/messenger": "<5.0",
+                "symfony/translation": "<5.0",
+                "symfony/twig-bridge": "<5.0",
+                "symfony/validator": "<5.0",
+                "twig/twig": "<2.4"
+            },
+            "provide": {
+                "psr/log-implementation": "1.0"
+            },
+            "require-dev": {
+                "psr/cache": "~1.0",
+                "symfony/browser-kit": "^4.4|^5.0",
+                "symfony/config": "^5.0",
+                "symfony/console": "^4.4|^5.0",
+                "symfony/css-selector": "^4.4|^5.0",
+                "symfony/dependency-injection": "^4.4|^5.0",
+                "symfony/dom-crawler": "^4.4|^5.0",
+                "symfony/expression-language": "^4.4|^5.0",
+                "symfony/finder": "^4.4|^5.0",
+                "symfony/process": "^4.4|^5.0",
+                "symfony/routing": "^4.4|^5.0",
+                "symfony/stopwatch": "^4.4|^5.0",
+                "symfony/translation": "^4.4|^5.0",
+                "symfony/translation-contracts": "^1.1|^2",
+                "twig/twig": "^2.4|^3.0"
+            },
+            "suggest": {
+                "symfony/browser-kit": "",
+                "symfony/config": "",
+                "symfony/console": "",
+                "symfony/dependency-injection": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\HttpKernel\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony HttpKernel Component",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-31 06:14:18"
+        },
+        {
+            "name": "symfony/mime",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/mime.git",
+                "reference": "56261f89385f9d13cf843a5101ac72131190bc91"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91",
+                "reference": "56261f89385f9d13cf843a5101ac72131190bc91",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "symfony/polyfill-intl-idn": "^1.10",
+                "symfony/polyfill-mbstring": "^1.0",
+                "symfony/polyfill-php80": "^1.15"
+            },
+            "conflict": {
+                "symfony/mailer": "<4.4"
+            },
+            "require-dev": {
+                "egulias/email-validator": "^2.1.10",
+                "symfony/dependency-injection": "^4.4|^5.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Mime\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "A library to manipulate MIME messages",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "mime",
+                "mime-type"
+            ],
+            "time": "2020-05-25 12:33:44"
+        },
+        {
+            "name": "symfony/polyfill-ctype",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-ctype.git",
+                "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
+                "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "suggest": {
+                "ext-ctype": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Ctype\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Gert de Pagter",
+                    "email": "BackEndTea@gmail.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for ctype functions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "ctype",
+                "polyfill",
+                "portable"
+            ],
+            "time": "2020-05-12 16:14:59"
+        },
+        {
+            "name": "symfony/polyfill-iconv",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-iconv.git",
+                "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c4de7601eefbf25f9d47190abe07f79fe0a27424",
+                "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "suggest": {
+                "ext-iconv": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Iconv\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for the Iconv extension",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "iconv",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-05-12 16:47:27"
+        },
+        {
+            "name": "symfony/polyfill-intl-grapheme",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+                "reference": "e094b0770f7833fdf257e6ba4775be4e258230b2"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e094b0770f7833fdf257e6ba4775be4e258230b2",
+                "reference": "e094b0770f7833fdf257e6ba4775be4e258230b2",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "suggest": {
+                "ext-intl": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for intl's grapheme_* functions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "grapheme",
+                "intl",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-05-12 16:47:27"
+        },
+        {
+            "name": "symfony/polyfill-intl-idn",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-intl-idn.git",
+                "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a",
+                "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "symfony/polyfill-mbstring": "^1.3",
+                "symfony/polyfill-php72": "^1.10"
+            },
+            "suggest": {
+                "ext-intl": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Intl\\Idn\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Laurent Bassin",
+                    "email": "laurent@bassin.info"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "idn",
+                "intl",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-05-12 16:47:27"
+        },
+        {
+            "name": "symfony/polyfill-intl-normalizer",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+                "reference": "1357b1d168eb7f68ad6a134838e46b0b159444a9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/1357b1d168eb7f68ad6a134838e46b0b159444a9",
+                "reference": "1357b1d168eb7f68ad6a134838e46b0b159444a9",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "suggest": {
+                "ext-intl": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for intl's Normalizer class and related functions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "intl",
+                "normalizer",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-05-12 16:14:59"
+        },
+        {
+            "name": "symfony/polyfill-mbstring",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-mbstring.git",
+                "reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
+                "reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "suggest": {
+                "ext-mbstring": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Mbstring\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for the Mbstring extension",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "mbstring",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-05-12 16:47:27"
+        },
+        {
+            "name": "symfony/polyfill-php72",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php72.git",
+                "reference": "f048e612a3905f34931127360bdd2def19a5e582"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582",
+                "reference": "f048e612a3905f34931127360bdd2def19a5e582",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php72\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-05-12 16:47:27"
+        },
+        {
+            "name": "symfony/polyfill-php73",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php73.git",
+                "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc",
+                "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php73\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-05-12 16:47:27"
+        },
+        {
+            "name": "symfony/polyfill-php80",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php80.git",
+                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd",
+                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.0.8"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php80\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Ion Bazan",
+                    "email": "ion.bazan@gmail.com"
+                },
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-05-12 16:47:27"
+        },
+        {
+            "name": "symfony/process",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/process.git",
+                "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/process/zipball/7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1",
+                "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "symfony/polyfill-php80": "^1.15"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Process\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Process Component",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-30 20:35:19"
+        },
+        {
+            "name": "symfony/routing",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/routing.git",
+                "reference": "95cf30145b26c758d6d832aa2d0de3128978d556"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/routing/zipball/95cf30145b26c758d6d832aa2d0de3128978d556",
+                "reference": "95cf30145b26c758d6d832aa2d0de3128978d556",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "symfony/deprecation-contracts": "^2.1",
+                "symfony/polyfill-php80": "^1.15"
+            },
+            "conflict": {
+                "symfony/config": "<5.0",
+                "symfony/dependency-injection": "<4.4",
+                "symfony/yaml": "<4.4"
+            },
+            "require-dev": {
+                "doctrine/annotations": "~1.2",
+                "psr/log": "~1.0",
+                "symfony/config": "^5.0",
+                "symfony/dependency-injection": "^4.4|^5.0",
+                "symfony/expression-language": "^4.4|^5.0",
+                "symfony/http-foundation": "^4.4|^5.0",
+                "symfony/yaml": "^4.4|^5.0"
+            },
+            "suggest": {
+                "doctrine/annotations": "For using the annotation loader",
+                "symfony/config": "For using the all-in-one router or any loader",
+                "symfony/expression-language": "For using expression matching",
+                "symfony/http-foundation": "For using a Symfony Request object",
+                "symfony/yaml": "For using the YAML loader"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Routing\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Routing Component",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "router",
+                "routing",
+                "uri",
+                "url"
+            ],
+            "time": "2020-05-30 20:35:19"
+        },
+        {
+            "name": "symfony/service-contracts",
+            "version": "v2.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/service-contracts.git",
+                "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b",
+                "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "psr/container": "^1.0"
+            },
+            "suggest": {
+                "symfony/service-implementation": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Contracts\\Service\\": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Generic abstractions related to writing services",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "abstractions",
+                "contracts",
+                "decoupling",
+                "interfaces",
+                "interoperability",
+                "standards"
+            ],
+            "time": "2020-05-20 17:43:50"
+        },
+        {
+            "name": "symfony/string",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/string.git",
+                "reference": "90c2a5103f07feb19069379f3abdcdbacc7753a9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/string/zipball/90c2a5103f07feb19069379f3abdcdbacc7753a9",
+                "reference": "90c2a5103f07feb19069379f3abdcdbacc7753a9",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "symfony/polyfill-ctype": "~1.8",
+                "symfony/polyfill-intl-grapheme": "~1.0",
+                "symfony/polyfill-intl-normalizer": "~1.0",
+                "symfony/polyfill-mbstring": "~1.0",
+                "symfony/polyfill-php80": "~1.15"
+            },
+            "require-dev": {
+                "symfony/error-handler": "^4.4|^5.0",
+                "symfony/http-client": "^4.4|^5.0",
+                "symfony/translation-contracts": "^1.1|^2",
+                "symfony/var-exporter": "^4.4|^5.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\String\\": ""
+                },
+                "files": [
+                    "Resources/functions.php"
+                ],
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony String component",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "grapheme",
+                "i18n",
+                "string",
+                "unicode",
+                "utf-8",
+                "utf8"
+            ],
+            "time": "2020-05-20 17:43:50"
+        },
+        {
+            "name": "symfony/translation",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/translation.git",
+                "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/translation/zipball/d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2",
+                "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "symfony/polyfill-mbstring": "~1.0",
+                "symfony/polyfill-php80": "^1.15",
+                "symfony/translation-contracts": "^2"
+            },
+            "conflict": {
+                "symfony/config": "<4.4",
+                "symfony/dependency-injection": "<5.0",
+                "symfony/http-kernel": "<5.0",
+                "symfony/twig-bundle": "<5.0",
+                "symfony/yaml": "<4.4"
+            },
+            "provide": {
+                "symfony/translation-implementation": "2.0"
+            },
+            "require-dev": {
+                "psr/log": "~1.0",
+                "symfony/config": "^4.4|^5.0",
+                "symfony/console": "^4.4|^5.0",
+                "symfony/dependency-injection": "^5.0",
+                "symfony/finder": "^4.4|^5.0",
+                "symfony/http-kernel": "^5.0",
+                "symfony/intl": "^4.4|^5.0",
+                "symfony/service-contracts": "^1.1.2|^2",
+                "symfony/yaml": "^4.4|^5.0"
+            },
+            "suggest": {
+                "psr/log-implementation": "To use logging capability in translator",
+                "symfony/config": "",
+                "symfony/yaml": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Translation\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Translation Component",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-30 20:35:19"
+        },
+        {
+            "name": "symfony/translation-contracts",
+            "version": "v2.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/translation-contracts.git",
+                "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e5ca07c8f817f865f618aa072c2fe8e0e637340e",
+                "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5"
+            },
+            "suggest": {
+                "symfony/translation-implementation": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Contracts\\Translation\\": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Generic abstractions related to translation",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "abstractions",
+                "contracts",
+                "decoupling",
+                "interfaces",
+                "interoperability",
+                "standards"
+            ],
+            "time": "2020-05-20 17:43:50"
+        },
+        {
+            "name": "symfony/var-dumper",
+            "version": "v5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/var-dumper.git",
+                "reference": "46a942903059b0b05e601f00eb64179e05578c0f"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/46a942903059b0b05e601f00eb64179e05578c0f",
+                "reference": "46a942903059b0b05e601f00eb64179e05578c0f",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2.5",
+                "symfony/polyfill-mbstring": "~1.0",
+                "symfony/polyfill-php80": "^1.15"
+            },
+            "conflict": {
+                "phpunit/phpunit": "<5.4.3",
+                "symfony/console": "<4.4"
+            },
+            "require-dev": {
+                "ext-iconv": "*",
+                "symfony/console": "^4.4|^5.0",
+                "symfony/process": "^4.4|^5.0",
+                "twig/twig": "^2.4|^3.0"
+            },
+            "suggest": {
+                "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
+                "ext-intl": "To show region name in time zone dump",
+                "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
+            },
+            "bin": [
+                "Resources/bin/var-dump-server"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.1-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "Resources/functions/dump.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Component\\VarDumper\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony mechanism for exploring and dumping PHP variables",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "debug",
+                "dump"
+            ],
+            "time": "2020-05-30 20:35:19"
+        },
+        {
+            "name": "tijsverkoyen/css-to-inline-styles",
+            "version": "2.2.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git",
+                "reference": "dda2ee426acd6d801d5b7fd1001cde9b5f790e15"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/dda2ee426acd6d801d5b7fd1001cde9b5f790e15",
+                "reference": "dda2ee426acd6d801d5b7fd1001cde9b5f790e15",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-libxml": "*",
+                "php": "^5.5 || ^7.0",
+                "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "TijsVerkoyen\\CssToInlineStyles\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Tijs Verkoyen",
+                    "email": "css_to_inline_styles@verkoyen.eu",
+                    "role": "Developer"
+                }
+            ],
+            "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.",
+            "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
+            "time": "2019-10-24 08:53:34"
+        },
+        {
+            "name": "vlucas/phpdotenv",
+            "version": "v4.1.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/vlucas/phpdotenv.git",
+                "reference": "0b32505d67c1abbfa829283c86bfc0642a661bf6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/0b32505d67c1abbfa829283c86bfc0642a661bf6",
+                "reference": "0b32505d67c1abbfa829283c86bfc0642a661bf6",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.5.9 || ^7.0 || ^8.0",
+                "phpoption/phpoption": "^1.7.2",
+                "symfony/polyfill-ctype": "^1.9"
+            },
+            "require-dev": {
+                "bamarni/composer-bin-plugin": "^1.3",
+                "ext-filter": "*",
+                "ext-pcre": "*",
+                "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
+            },
+            "suggest": {
+                "ext-filter": "Required to use the boolean validator.",
+                "ext-pcre": "Required to use most of the library."
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.1-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Dotenv\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Graham Campbell",
+                    "email": "graham@alt-three.com",
+                    "homepage": "https://gjcampbell.co.uk/"
+                },
+                {
+                    "name": "Vance Lucas",
+                    "email": "vance@vancelucas.com",
+                    "homepage": "https://vancelucas.com/"
+                }
+            ],
+            "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.",
+            "keywords": [
+                "dotenv",
+                "env",
+                "environment"
+            ],
+            "time": "2020-05-23 09:43:32"
+        },
+        {
+            "name": "voku/portable-ascii",
+            "version": "1.5.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/voku/portable-ascii.git",
+                "reference": "e7f9bd5deff09a57318f9b900ab33a05acfcf4d3"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/voku/portable-ascii/zipball/e7f9bd5deff09a57318f9b900ab33a05acfcf4d3",
+                "reference": "e7f9bd5deff09a57318f9b900ab33a05acfcf4d3",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.0.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~6.0 || ~7.0"
+            },
+            "suggest": {
+                "ext-intl": "Use Intl for transliterator_transliterate() support"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "voku\\": "src/voku/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Lars Moelleken",
+                    "homepage": "http://www.moelleken.org/"
+                }
+            ],
+            "description": "Portable ASCII library - performance optimized (ascii) string functions for php.",
+            "homepage": "https://github.com/voku/portable-ascii",
+            "keywords": [
+                "ascii",
+                "clean",
+                "php"
+            ],
+            "time": "2020-05-26 06:40:44"
+        }
+    ],
+    "packages-dev": [
+        {
+            "name": "doctrine/instantiator",
+            "version": "1.3.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/instantiator.git",
+                "reference": "f350df0268e904597e3bd9c4685c53e0e333feea"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea",
+                "reference": "f350df0268e904597e3bd9c4685c53e0e333feea",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1 || ^8.0"
+            },
+            "require-dev": {
+                "doctrine/coding-standard": "^6.0",
+                "ext-pdo": "*",
+                "ext-phar": "*",
+                "phpbench/phpbench": "^0.13",
+                "phpstan/phpstan-phpunit": "^0.11",
+                "phpstan/phpstan-shim": "^0.11",
+                "phpunit/phpunit": "^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.2.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Marco Pivetta",
+                    "email": "ocramius@gmail.com",
+                    "homepage": "http://ocramius.github.com/"
+                }
+            ],
+            "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+            "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
+            "keywords": [
+                "constructor",
+                "instantiate"
+            ],
+            "time": "2020-05-29 17:27:14"
+        },
+        {
+            "name": "facade/flare-client-php",
+            "version": "1.3.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/facade/flare-client-php.git",
+                "reference": "db1e03426e7f9472c9ecd1092aff00f56aa6c004"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/facade/flare-client-php/zipball/db1e03426e7f9472c9ecd1092aff00f56aa6c004",
+                "reference": "db1e03426e7f9472c9ecd1092aff00f56aa6c004",
+                "shasum": ""
+            },
+            "require": {
+                "facade/ignition-contracts": "~1.0",
+                "illuminate/pipeline": "^5.5|^6.0|^7.0",
+                "php": "^7.1",
+                "symfony/http-foundation": "^3.3|^4.1|^5.0",
+                "symfony/var-dumper": "^3.4|^4.0|^5.0"
+            },
+            "require-dev": {
+                "larapack/dd": "^1.1",
+                "phpunit/phpunit": "^7.5.16",
+                "spatie/phpunit-snapshot-assertions": "^2.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Facade\\FlareClient\\": "src"
+                },
+                "files": [
+                    "src/helpers.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "Send PHP errors to Flare",
+            "homepage": "https://github.com/facade/flare-client-php",
+            "keywords": [
+                "exception",
+                "facade",
+                "flare",
+                "reporting"
+            ],
+            "time": "2020-03-02 15:52:04"
+        },
+        {
+            "name": "facade/ignition",
+            "version": "2.0.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/facade/ignition.git",
+                "reference": "5261c488a1e8a7c3ebdf6a4037c34f5ddeb33922"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/facade/ignition/zipball/5261c488a1e8a7c3ebdf6a4037c34f5ddeb33922",
+                "reference": "5261c488a1e8a7c3ebdf6a4037c34f5ddeb33922",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "ext-mbstring": "*",
+                "facade/flare-client-php": "^1.0",
+                "facade/ignition-contracts": "^1.0",
+                "filp/whoops": "^2.4",
+                "illuminate/support": "^7.0|^8.0",
+                "monolog/monolog": "^2.0",
+                "php": "^7.2.5",
+                "scrivo/highlight.php": "^9.15",
+                "symfony/console": "^5.0",
+                "symfony/var-dumper": "^5.0"
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "^2.14",
+                "mockery/mockery": "^1.3",
+                "orchestra/testbench": "5.0"
+            },
+            "suggest": {
+                "laravel/telescope": "^3.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.x-dev"
+                },
+                "laravel": {
+                    "providers": [
+                        "Facade\\Ignition\\IgnitionServiceProvider"
+                    ],
+                    "aliases": {
+                        "Flare": "Facade\\Ignition\\Facades\\Flare"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Facade\\Ignition\\": "src"
+                },
+                "files": [
+                    "src/helpers.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "A beautiful error page for Laravel applications.",
+            "homepage": "https://github.com/facade/ignition",
+            "keywords": [
+                "error",
+                "flare",
+                "laravel",
+                "page"
+            ],
+            "time": "2020-06-01 09:04:48"
+        },
+        {
+            "name": "facade/ignition-contracts",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/facade/ignition-contracts.git",
+                "reference": "f445db0fb86f48e205787b2592840dd9c80ded28"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/f445db0fb86f48e205787b2592840dd9c80ded28",
+                "reference": "f445db0fb86f48e205787b2592840dd9c80ded28",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Facade\\IgnitionContracts\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Freek Van der Herten",
+                    "email": "freek@spatie.be",
+                    "homepage": "https://flareapp.io",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Solution contracts for Ignition",
+            "homepage": "https://github.com/facade/ignition-contracts",
+            "keywords": [
+                "contracts",
+                "flare",
+                "ignition"
+            ],
+            "time": "2019-08-30 14:06:08"
+        },
+        {
+            "name": "filp/whoops",
+            "version": "2.7.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/filp/whoops.git",
+                "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/filp/whoops/zipball/17d0d3f266c8f925ebd035cd36f83cf802b47d4a",
+                "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.5.9 || ^7.0",
+                "psr/log": "^1.0.1"
+            },
+            "require-dev": {
+                "mockery/mockery": "^0.9 || ^1.0",
+                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0",
+                "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
+            },
+            "suggest": {
+                "symfony/var-dumper": "Pretty print complex values better with var-dumper available",
+                "whoops/soap": "Formats errors as SOAP responses"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.6-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Whoops\\": "src/Whoops/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Filipe Dobreira",
+                    "homepage": "https://github.com/filp",
+                    "role": "Developer"
+                }
+            ],
+            "description": "php error handling for cool kids",
+            "homepage": "https://filp.github.io/whoops/",
+            "keywords": [
+                "error",
+                "exception",
+                "handling",
+                "library",
+                "throwable",
+                "whoops"
+            ],
+            "time": "2020-05-05 12:28:07"
+        },
+        {
+            "name": "fzaninotto/faker",
+            "version": "v1.9.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/fzaninotto/Faker.git",
+                "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/fc10d778e4b84d5bd315dad194661e091d307c6f",
+                "reference": "fc10d778e4b84d5bd315dad194661e091d307c6f",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.3.3 || ^7.0"
+            },
+            "require-dev": {
+                "ext-intl": "*",
+                "phpunit/phpunit": "^4.8.35 || ^5.7",
+                "squizlabs/php_codesniffer": "^2.9.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.9-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Faker\\": "src/Faker/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "François Zaninotto"
+                }
+            ],
+            "description": "Faker is a PHP library that generates fake data for you.",
+            "keywords": [
+                "data",
+                "faker",
+                "fixtures"
+            ],
+            "abandoned": true,
+            "time": "2019-12-12 13:22:17"
+        },
+        {
+            "name": "hamcrest/hamcrest-php",
+            "version": "v2.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/hamcrest/hamcrest-php.git",
+                "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad",
+                "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.3|^7.0"
+            },
+            "replace": {
+                "cordoval/hamcrest-php": "*",
+                "davedevelopment/hamcrest-php": "*",
+                "kodova/hamcrest-php": "*"
+            },
+            "require-dev": {
+                "phpunit/php-file-iterator": "1.3.3",
+                "phpunit/phpunit": "~4.0",
+                "satooshi/php-coveralls": "^1.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "hamcrest"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD"
+            ],
+            "description": "This is the PHP port of Hamcrest Matchers",
+            "keywords": [
+                "test"
+            ],
+            "time": "2016-01-20 08:20:44"
+        },
+        {
+            "name": "mockery/mockery",
+            "version": "1.3.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mockery/mockery.git",
+                "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mockery/mockery/zipball/f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be",
+                "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be",
+                "shasum": ""
+            },
+            "require": {
+                "hamcrest/hamcrest-php": "~2.0",
+                "lib-pcre": ">=7.0",
+                "php": ">=5.6.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.3.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Mockery": "library/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Pádraic Brady",
+                    "email": "padraic.brady@gmail.com",
+                    "homepage": "http://blog.astrumfutura.com"
+                },
+                {
+                    "name": "Dave Marshall",
+                    "email": "dave.marshall@atstsolutions.co.uk",
+                    "homepage": "http://davedevelopment.co.uk"
+                }
+            ],
+            "description": "Mockery is a simple yet flexible PHP mock object framework",
+            "homepage": "https://github.com/mockery/mockery",
+            "keywords": [
+                "BDD",
+                "TDD",
+                "library",
+                "mock",
+                "mock objects",
+                "mockery",
+                "stub",
+                "test",
+                "test double",
+                "testing"
+            ],
+            "time": "2019-12-26 09:49:15"
+        },
+        {
+            "name": "myclabs/deep-copy",
+            "version": "1.9.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/myclabs/DeepCopy.git",
+                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
+                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "replace": {
+                "myclabs/deep-copy": "self.version"
+            },
+            "require-dev": {
+                "doctrine/collections": "^1.0",
+                "doctrine/common": "^2.6",
+                "phpunit/phpunit": "^7.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "DeepCopy\\": "src/DeepCopy/"
+                },
+                "files": [
+                    "src/DeepCopy/deep_copy.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "Create deep copies (clones) of your objects",
+            "keywords": [
+                "clone",
+                "copy",
+                "duplicate",
+                "object",
+                "object graph"
+            ],
+            "time": "2020-01-17 21:11:47"
+        },
+        {
+            "name": "nunomaduro/collision",
+            "version": "v4.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/nunomaduro/collision.git",
+                "reference": "d50490417eded97be300a92cd7df7badc37a9018"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/nunomaduro/collision/zipball/d50490417eded97be300a92cd7df7badc37a9018",
+                "reference": "d50490417eded97be300a92cd7df7badc37a9018",
+                "shasum": ""
+            },
+            "require": {
+                "facade/ignition-contracts": "^1.0",
+                "filp/whoops": "^2.4",
+                "php": "^7.2.5",
+                "symfony/console": "^5.0"
+            },
+            "require-dev": {
+                "facade/ignition": "^2.0",
+                "fideloper/proxy": "^4.2",
+                "friendsofphp/php-cs-fixer": "^2.16",
+                "fruitcake/laravel-cors": "^1.0",
+                "laravel/framework": "^7.0",
+                "laravel/tinker": "^2.0",
+                "nunomaduro/larastan": "^0.5",
+                "orchestra/testbench": "^5.0",
+                "phpstan/phpstan": "^0.12.3",
+                "phpunit/phpunit": "^8.5.1 || ^9.0"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "NunoMaduro\\Collision\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nuno Maduro",
+                    "email": "enunomaduro@gmail.com"
+                }
+            ],
+            "description": "Cli error handling for console/command-line PHP applications.",
+            "keywords": [
+                "artisan",
+                "cli",
+                "command-line",
+                "console",
+                "error",
+                "handling",
+                "laravel",
+                "laravel-zero",
+                "php",
+                "symfony"
+            ],
+            "time": "2020-04-04 19:56:08"
+        },
+        {
+            "name": "phar-io/manifest",
+            "version": "1.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phar-io/manifest.git",
+                "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
+                "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-phar": "*",
+                "phar-io/version": "^2.0",
+                "php": "^5.6 || ^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Arne Blankerts",
+                    "email": "arne@blankerts.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Heuer",
+                    "email": "sebastian@phpeople.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+            "time": "2018-07-08 19:23:20"
+        },
+        {
+            "name": "phar-io/version",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phar-io/version.git",
+                "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6",
+                "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.6 || ^7.0"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Arne Blankerts",
+                    "email": "arne@blankerts.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Heuer",
+                    "email": "sebastian@phpeople.de",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Library for handling version information and constraints",
+            "time": "2018-07-08 19:19:57"
+        },
+        {
+            "name": "phpdocumentor/reflection-common",
+            "version": "2.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
+                "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
+                "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jaap van Otterdijk",
+                    "email": "opensource@ijaap.nl"
+                }
+            ],
+            "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
+            "homepage": "http://www.phpdoc.org",
+            "keywords": [
+                "FQSEN",
+                "phpDocumentor",
+                "phpdoc",
+                "reflection",
+                "static analysis"
+            ],
+            "time": "2020-04-27 09:25:28"
+        },
+        {
+            "name": "phpdocumentor/reflection-docblock",
+            "version": "5.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+                "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
+                "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
+                "shasum": ""
+            },
+            "require": {
+                "ext-filter": "^7.1",
+                "php": "^7.2",
+                "phpdocumentor/reflection-common": "^2.0",
+                "phpdocumentor/type-resolver": "^1.0",
+                "webmozart/assert": "^1"
+            },
+            "require-dev": {
+                "doctrine/instantiator": "^1",
+                "mockery/mockery": "^1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "5.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mike van Riel",
+                    "email": "me@mikevanriel.com"
+                },
+                {
+                    "name": "Jaap van Otterdijk",
+                    "email": "account@ijaap.nl"
+                }
+            ],
+            "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
+            "time": "2020-02-22 12:28:44"
+        },
+        {
+            "name": "phpdocumentor/type-resolver",
+            "version": "1.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/TypeResolver.git",
+                "reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
+                "reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2",
+                "phpdocumentor/reflection-common": "^2.0"
+            },
+            "require-dev": {
+                "ext-tokenizer": "^7.2",
+                "mockery/mockery": "~1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "phpDocumentor\\Reflection\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mike van Riel",
+                    "email": "me@mikevanriel.com"
+                }
+            ],
+            "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
+            "time": "2020-02-18 18:59:58"
+        },
+        {
+            "name": "phpspec/prophecy",
+            "version": "v1.10.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpspec/prophecy.git",
+                "reference": "451c3cd1418cf640de218914901e51b064abb093"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
+                "reference": "451c3cd1418cf640de218914901e51b064abb093",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "^1.0.2",
+                "php": "^5.3|^7.0",
+                "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
+                "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
+                "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
+            },
+            "require-dev": {
+                "phpspec/phpspec": "^2.5 || ^3.2",
+                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.10.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Prophecy\\": "src/Prophecy"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Konstantin Kudryashov",
+                    "email": "ever.zet@gmail.com",
+                    "homepage": "http://everzet.com"
+                },
+                {
+                    "name": "Marcello Duarte",
+                    "email": "marcello.duarte@gmail.com"
+                }
+            ],
+            "description": "Highly opinionated mocking framework for PHP 5.3+",
+            "homepage": "https://github.com/phpspec/prophecy",
+            "keywords": [
+                "Double",
+                "Dummy",
+                "fake",
+                "mock",
+                "spy",
+                "stub"
+            ],
+            "time": "2020-03-05 15:02:03"
+        },
+        {
+            "name": "phpunit/php-code-coverage",
+            "version": "7.0.10",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+                "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf",
+                "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-xmlwriter": "*",
+                "php": "^7.2",
+                "phpunit/php-file-iterator": "^2.0.2",
+                "phpunit/php-text-template": "^1.2.1",
+                "phpunit/php-token-stream": "^3.1.1",
+                "sebastian/code-unit-reverse-lookup": "^1.0.1",
+                "sebastian/environment": "^4.2.2",
+                "sebastian/version": "^2.0.1",
+                "theseer/tokenizer": "^1.1.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^8.2.2"
+            },
+            "suggest": {
+                "ext-xdebug": "^2.7.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "7.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+            "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+            "keywords": [
+                "coverage",
+                "testing",
+                "xunit"
+            ],
+            "time": "2019-11-20 13:55:58"
+        },
+        {
+            "name": "phpunit/php-file-iterator",
+            "version": "2.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+                "reference": "050bedf145a257b1ff02746c31894800e5122946"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946",
+                "reference": "050bedf145a257b1ff02746c31894800e5122946",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+            "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+            "keywords": [
+                "filesystem",
+                "iterator"
+            ],
+            "time": "2018-09-13 20:33:42"
+        },
+        {
+            "name": "phpunit/php-text-template",
+            "version": "1.2.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-text-template.git",
+                "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+                "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Simple template engine.",
+            "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+            "keywords": [
+                "template"
+            ],
+            "time": "2015-06-21 13:50:34"
+        },
+        {
+            "name": "phpunit/php-timer",
+            "version": "2.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-timer.git",
+                "reference": "1038454804406b0b5f5f520358e78c1c2f71501e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e",
+                "reference": "1038454804406b0b5f5f520358e78c1c2f71501e",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.1-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Utility class for timing",
+            "homepage": "https://github.com/sebastianbergmann/php-timer/",
+            "keywords": [
+                "timer"
+            ],
+            "time": "2019-06-07 04:22:29"
+        },
+        {
+            "name": "phpunit/php-token-stream",
+            "version": "3.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/php-token-stream.git",
+                "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff",
+                "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff",
+                "shasum": ""
+            },
+            "require": {
+                "ext-tokenizer": "*",
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.1-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Wrapper around PHP's tokenizer extension.",
+            "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
+            "keywords": [
+                "tokenizer"
+            ],
+            "abandoned": true,
+            "time": "2019-09-17 06:23:10"
+        },
+        {
+            "name": "phpunit/phpunit",
+            "version": "8.5.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/phpunit.git",
+                "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/63dda3b212a0025d380a745f91bdb4d8c985adb7",
+                "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "^1.2.0",
+                "ext-dom": "*",
+                "ext-json": "*",
+                "ext-libxml": "*",
+                "ext-mbstring": "*",
+                "ext-xml": "*",
+                "ext-xmlwriter": "*",
+                "myclabs/deep-copy": "^1.9.1",
+                "phar-io/manifest": "^1.0.3",
+                "phar-io/version": "^2.0.1",
+                "php": "^7.2",
+                "phpspec/prophecy": "^1.8.1",
+                "phpunit/php-code-coverage": "^7.0.7",
+                "phpunit/php-file-iterator": "^2.0.2",
+                "phpunit/php-text-template": "^1.2.1",
+                "phpunit/php-timer": "^2.1.2",
+                "sebastian/comparator": "^3.0.2",
+                "sebastian/diff": "^3.0.2",
+                "sebastian/environment": "^4.2.2",
+                "sebastian/exporter": "^3.1.1",
+                "sebastian/global-state": "^3.0.0",
+                "sebastian/object-enumerator": "^3.0.3",
+                "sebastian/resource-operations": "^2.0.1",
+                "sebastian/type": "^1.1.3",
+                "sebastian/version": "^2.0.1"
+            },
+            "require-dev": {
+                "ext-pdo": "*"
+            },
+            "suggest": {
+                "ext-soap": "*",
+                "ext-xdebug": "*",
+                "phpunit/php-invoker": "^2.0.0"
+            },
+            "bin": [
+                "phpunit"
+            ],
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "8.5-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "The PHP Unit Testing framework.",
+            "homepage": "https://phpunit.de/",
+            "keywords": [
+                "phpunit",
+                "testing",
+                "xunit"
+            ],
+            "time": "2020-05-22 13:51:52"
+        },
+        {
+            "name": "scrivo/highlight.php",
+            "version": "v9.18.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/scrivo/highlight.php.git",
+                "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/52fc21c99fd888e33aed4879e55a3646f8d40558",
+                "reference": "52fc21c99fd888e33aed4879e55a3646f8d40558",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "ext-mbstring": "*",
+                "php": ">=5.4"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8|^5.7",
+                "sabberworm/php-css-parser": "^8.3",
+                "symfony/finder": "^2.8|^3.4",
+                "symfony/var-dumper": "^2.8|^3.4"
+            },
+            "suggest": {
+                "ext-dom": "Needed to make use of the features in the utilities namespace"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-0": {
+                    "Highlight\\": "",
+                    "HighlightUtilities\\": ""
+                },
+                "files": [
+                    "HighlightUtilities/functions.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Geert Bergman",
+                    "homepage": "http://www.scrivo.org/",
+                    "role": "Project Author"
+                },
+                {
+                    "name": "Vladimir Jimenez",
+                    "homepage": "https://allejo.io",
+                    "role": "Maintainer"
+                },
+                {
+                    "name": "Martin Folkers",
+                    "homepage": "https://twobrain.io",
+                    "role": "Contributor"
+                }
+            ],
+            "description": "Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js",
+            "keywords": [
+                "code",
+                "highlight",
+                "highlight.js",
+                "highlight.php",
+                "syntax"
+            ],
+            "time": "2020-03-02 05:59:21"
+        },
+        {
+            "name": "sebastian/code-unit-reverse-lookup",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
+                "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+                "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.6 || ^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^5.7 || ^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Looks up which function or method a line of code belongs to",
+            "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
+            "time": "2017-03-04 06:30:41"
+        },
+        {
+            "name": "sebastian/comparator",
+            "version": "3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/comparator.git",
+                "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
+                "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1",
+                "sebastian/diff": "^3.0",
+                "sebastian/exporter": "^3.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Volker Dusch",
+                    "email": "github@wallbash.com"
+                },
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@2bepublished.at"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides the functionality to compare PHP values for equality",
+            "homepage": "https://github.com/sebastianbergmann/comparator",
+            "keywords": [
+                "comparator",
+                "compare",
+                "equality"
+            ],
+            "time": "2018-07-12 15:12:46"
+        },
+        {
+            "name": "sebastian/diff",
+            "version": "3.0.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/diff.git",
+                "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
+                "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.5 || ^8.0",
+                "symfony/process": "^2 || ^3.3 || ^4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Kore Nordmann",
+                    "email": "mail@kore-nordmann.de"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Diff implementation",
+            "homepage": "https://github.com/sebastianbergmann/diff",
+            "keywords": [
+                "diff",
+                "udiff",
+                "unidiff",
+                "unified diff"
+            ],
+            "time": "2019-02-04 06:01:07"
+        },
+        {
+            "name": "sebastian/environment",
+            "version": "4.2.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/environment.git",
+                "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368",
+                "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7.5"
+            },
+            "suggest": {
+                "ext-posix": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.2-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides functionality to handle HHVM/PHP environments",
+            "homepage": "http://www.github.com/sebastianbergmann/environment",
+            "keywords": [
+                "Xdebug",
+                "environment",
+                "hhvm"
+            ],
+            "time": "2019-11-20 08:46:58"
+        },
+        {
+            "name": "sebastian/exporter",
+            "version": "3.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/exporter.git",
+                "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e",
+                "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.0",
+                "sebastian/recursion-context": "^3.0"
+            },
+            "require-dev": {
+                "ext-mbstring": "*",
+                "phpunit/phpunit": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.1.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Volker Dusch",
+                    "email": "github@wallbash.com"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                },
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@gmail.com"
+                }
+            ],
+            "description": "Provides the functionality to export PHP variables for visualization",
+            "homepage": "http://www.github.com/sebastianbergmann/exporter",
+            "keywords": [
+                "export",
+                "exporter"
+            ],
+            "time": "2019-09-14 09:02:43"
+        },
+        {
+            "name": "sebastian/global-state",
+            "version": "3.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/global-state.git",
+                "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
+                "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2",
+                "sebastian/object-reflector": "^1.1.1",
+                "sebastian/recursion-context": "^3.0"
+            },
+            "require-dev": {
+                "ext-dom": "*",
+                "phpunit/phpunit": "^8.0"
+            },
+            "suggest": {
+                "ext-uopz": "*"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Snapshotting of global state",
+            "homepage": "http://www.github.com/sebastianbergmann/global-state",
+            "keywords": [
+                "global state"
+            ],
+            "time": "2019-02-01 05:30:01"
+        },
+        {
+            "name": "sebastian/object-enumerator",
+            "version": "3.0.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/object-enumerator.git",
+                "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+                "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.0",
+                "sebastian/object-reflector": "^1.1.1",
+                "sebastian/recursion-context": "^3.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Traverses array structures and object graphs to enumerate all referenced objects",
+            "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
+            "time": "2017-08-03 12:35:26"
+        },
+        {
+            "name": "sebastian/object-reflector",
+            "version": "1.1.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/object-reflector.git",
+                "reference": "773f97c67f28de00d397be301821b06708fca0be"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
+                "reference": "773f97c67f28de00d397be301821b06708fca0be",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Allows reflection of object attributes, including inherited and non-public ones",
+            "homepage": "https://github.com/sebastianbergmann/object-reflector/",
+            "time": "2017-03-29 09:07:27"
+        },
+        {
+            "name": "sebastian/recursion-context",
+            "version": "3.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/recursion-context.git",
+                "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+                "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^6.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jeff Welch",
+                    "email": "whatthejeff@gmail.com"
+                },
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                },
+                {
+                    "name": "Adam Harvey",
+                    "email": "aharvey@php.net"
+                }
+            ],
+            "description": "Provides functionality to recursively process PHP variables",
+            "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+            "time": "2017-03-03 06:23:57"
+        },
+        {
+            "name": "sebastian/resource-operations",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/resource-operations.git",
+                "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
+                "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de"
+                }
+            ],
+            "description": "Provides a list of PHP built-in functions that operate on resources",
+            "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+            "time": "2018-10-04 04:07:39"
+        },
+        {
+            "name": "sebastian/type",
+            "version": "1.1.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/type.git",
+                "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3",
+                "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.2"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^8.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Collection of value objects that represent the types of the PHP type system",
+            "homepage": "https://github.com/sebastianbergmann/type",
+            "time": "2019-07-02 08:10:15"
+        },
+        {
+            "name": "sebastian/version",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sebastianbergmann/version.git",
+                "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
+                "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.6"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian Bergmann",
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
+                }
+            ],
+            "description": "Library that helps with managing the version number of Git-hosted PHP projects",
+            "homepage": "https://github.com/sebastianbergmann/version",
+            "time": "2016-10-03 07:35:21"
+        },
+        {
+            "name": "theseer/tokenizer",
+            "version": "1.1.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/theseer/tokenizer.git",
+                "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+                "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-tokenizer": "*",
+                "ext-xmlwriter": "*",
+                "php": "^7.0"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Arne Blankerts",
+                    "email": "arne@blankerts.de",
+                    "role": "Developer"
+                }
+            ],
+            "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
+            "time": "2019-06-13 22:48:21"
+        },
+        {
+            "name": "webmozart/assert",
+            "version": "1.8.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/webmozart/assert.git",
+                "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
+                "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^5.3.3 || ^7.0",
+                "symfony/polyfill-ctype": "^1.8"
+            },
+            "conflict": {
+                "vimeo/psalm": "<3.9.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4.8.36 || ^7.5.13"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Webmozart\\Assert\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Bernhard Schussek",
+                    "email": "bschussek@gmail.com"
+                }
+            ],
+            "description": "Assertions to validate method input/output with nice error messages.",
+            "keywords": [
+                "assert",
+                "check",
+                "validate"
+            ],
+            "time": "2020-04-18 12:12:48"
+        }
+    ],
+    "aliases": [],
+    "minimum-stability": "dev",
+    "stability-flags": [],
+    "prefer-stable": true,
+    "prefer-lowest": false,
+    "platform": {
+        "php": "^7.2.5"
+    },
+    "platform-dev": []
+}

+ 232 - 0
config/app.php

@@ -0,0 +1,232 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Application Name
+    |--------------------------------------------------------------------------
+    |
+    | This value is the name of your application. This value is used when the
+    | framework needs to place the application's name in a notification or
+    | any other location as required by the application or its packages.
+    |
+    */
+
+    'name' => env('APP_NAME', 'Laravel'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Application Environment
+    |--------------------------------------------------------------------------
+    |
+    | This value determines the "environment" your application is currently
+    | running in. This may determine how you prefer to configure various
+    | services the application utilizes. Set this in your ".env" file.
+    |
+    */
+
+    'env' => env('APP_ENV', 'production'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Application Debug Mode
+    |--------------------------------------------------------------------------
+    |
+    | When your application is in debug mode, detailed error messages with
+    | stack traces will be shown on every error that occurs within your
+    | application. If disabled, a simple generic error page is shown.
+    |
+    */
+
+    'debug' => (bool) env('APP_DEBUG', false),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Application URL
+    |--------------------------------------------------------------------------
+    |
+    | This URL is used by the console to properly generate URLs when using
+    | the Artisan command line tool. You should set this to the root of
+    | your application so that it is used when running Artisan tasks.
+    |
+    */
+
+    'url' => env('APP_URL', 'http://localhost'),
+
+    'asset_url' => env('ASSET_URL', null),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Application Timezone
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify the default timezone for your application, which
+    | will be used by the PHP date and date-time functions. We have gone
+    | ahead and set this to a sensible default for you out of the box.
+    |
+    */
+
+    'timezone' => 'UTC',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Application Locale Configuration
+    |--------------------------------------------------------------------------
+    |
+    | The application locale determines the default locale that will be used
+    | by the translation service provider. You are free to set this value
+    | to any of the locales which will be supported by the application.
+    |
+    */
+
+    'locale' => 'en',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Application Fallback Locale
+    |--------------------------------------------------------------------------
+    |
+    | The fallback locale determines the locale to use when the current one
+    | is not available. You may change the value to correspond to any of
+    | the language folders that are provided through your application.
+    |
+    */
+
+    'fallback_locale' => 'en',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Faker Locale
+    |--------------------------------------------------------------------------
+    |
+    | This locale will be used by the Faker PHP library when generating fake
+    | data for your database seeds. For example, this will be used to get
+    | localized telephone numbers, street address information and more.
+    |
+    */
+
+    'faker_locale' => 'en_US',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Encryption Key
+    |--------------------------------------------------------------------------
+    |
+    | This key is used by the Illuminate encrypter service and should be set
+    | to a random, 32 character string, otherwise these encrypted strings
+    | will not be safe. Please do this before deploying an application!
+    |
+    */
+
+    'key' => env('APP_KEY'),
+
+    'cipher' => 'AES-256-CBC',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Autoloaded Service Providers
+    |--------------------------------------------------------------------------
+    |
+    | The service providers listed here will be automatically loaded on the
+    | request to your application. Feel free to add your own services to
+    | this array to grant expanded functionality to your applications.
+    |
+    */
+
+    'providers' => [
+
+        /*
+         * Laravel Framework Service Providers...
+         */
+        Illuminate\Auth\AuthServiceProvider::class,
+        Illuminate\Broadcasting\BroadcastServiceProvider::class,
+        Illuminate\Bus\BusServiceProvider::class,
+        Illuminate\Cache\CacheServiceProvider::class,
+        Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
+        Illuminate\Cookie\CookieServiceProvider::class,
+        Illuminate\Database\DatabaseServiceProvider::class,
+        Illuminate\Encryption\EncryptionServiceProvider::class,
+        Illuminate\Filesystem\FilesystemServiceProvider::class,
+        Illuminate\Foundation\Providers\FoundationServiceProvider::class,
+        Illuminate\Hashing\HashServiceProvider::class,
+        Illuminate\Mail\MailServiceProvider::class,
+        Illuminate\Notifications\NotificationServiceProvider::class,
+        Illuminate\Pagination\PaginationServiceProvider::class,
+        Illuminate\Pipeline\PipelineServiceProvider::class,
+        Illuminate\Queue\QueueServiceProvider::class,
+        Illuminate\Redis\RedisServiceProvider::class,
+        Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
+        Illuminate\Session\SessionServiceProvider::class,
+        Illuminate\Translation\TranslationServiceProvider::class,
+        Illuminate\Validation\ValidationServiceProvider::class,
+        Illuminate\View\ViewServiceProvider::class,
+
+        /*
+         * Package Service Providers...
+         */
+
+        /*
+         * Application Service Providers...
+         */
+        App\Providers\AppServiceProvider::class,
+        App\Providers\AuthServiceProvider::class,
+        // App\Providers\BroadcastServiceProvider::class,
+        App\Providers\EventServiceProvider::class,
+        App\Providers\RouteServiceProvider::class,
+
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Class Aliases
+    |--------------------------------------------------------------------------
+    |
+    | This array of class aliases will be registered when this application
+    | is started. However, feel free to register as many as you wish as
+    | the aliases are "lazy" loaded so they don't hinder performance.
+    |
+    */
+
+    'aliases' => [
+
+        'App' => Illuminate\Support\Facades\App::class,
+        'Arr' => Illuminate\Support\Arr::class,
+        'Artisan' => Illuminate\Support\Facades\Artisan::class,
+        'Auth' => Illuminate\Support\Facades\Auth::class,
+        'Blade' => Illuminate\Support\Facades\Blade::class,
+        'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
+        'Bus' => Illuminate\Support\Facades\Bus::class,
+        'Cache' => Illuminate\Support\Facades\Cache::class,
+        'Config' => Illuminate\Support\Facades\Config::class,
+        'Cookie' => Illuminate\Support\Facades\Cookie::class,
+        'Crypt' => Illuminate\Support\Facades\Crypt::class,
+        'DB' => Illuminate\Support\Facades\DB::class,
+        'Eloquent' => Illuminate\Database\Eloquent\Model::class,
+        'Event' => Illuminate\Support\Facades\Event::class,
+        'File' => Illuminate\Support\Facades\File::class,
+        'Gate' => Illuminate\Support\Facades\Gate::class,
+        'Hash' => Illuminate\Support\Facades\Hash::class,
+        'Http' => Illuminate\Support\Facades\Http::class,
+        'Lang' => Illuminate\Support\Facades\Lang::class,
+        'Log' => Illuminate\Support\Facades\Log::class,
+        'Mail' => Illuminate\Support\Facades\Mail::class,
+        'Notification' => Illuminate\Support\Facades\Notification::class,
+        'Password' => Illuminate\Support\Facades\Password::class,
+        'Queue' => Illuminate\Support\Facades\Queue::class,
+        'Redirect' => Illuminate\Support\Facades\Redirect::class,
+        'Redis' => Illuminate\Support\Facades\Redis::class,
+        'Request' => Illuminate\Support\Facades\Request::class,
+        'Response' => Illuminate\Support\Facades\Response::class,
+        'Route' => Illuminate\Support\Facades\Route::class,
+        'Schema' => Illuminate\Support\Facades\Schema::class,
+        'Session' => Illuminate\Support\Facades\Session::class,
+        'Storage' => Illuminate\Support\Facades\Storage::class,
+        'Str' => Illuminate\Support\Str::class,
+        'URL' => Illuminate\Support\Facades\URL::class,
+        'Validator' => Illuminate\Support\Facades\Validator::class,
+        'View' => Illuminate\Support\Facades\View::class,
+
+    ],
+
+];

+ 117 - 0
config/auth.php

@@ -0,0 +1,117 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Authentication Defaults
+    |--------------------------------------------------------------------------
+    |
+    | This option controls the default authentication "guard" and password
+    | reset options for your application. You may change these defaults
+    | as required, but they're a perfect start for most applications.
+    |
+    */
+
+    'defaults' => [
+        'guard' => 'web',
+        'passwords' => 'users',
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Authentication Guards
+    |--------------------------------------------------------------------------
+    |
+    | Next, you may define every authentication guard for your application.
+    | Of course, a great default configuration has been defined for you
+    | here which uses session storage and the Eloquent user provider.
+    |
+    | All authentication drivers have a user provider. This defines how the
+    | users are actually retrieved out of your database or other storage
+    | mechanisms used by this application to persist your user's data.
+    |
+    | Supported: "session", "token"
+    |
+    */
+
+    'guards' => [
+        'web' => [
+            'driver' => 'session',
+            'provider' => 'users',
+        ],
+
+        'api' => [
+            'driver' => 'token',
+            'provider' => 'users',
+            'hash' => false,
+        ],
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | User Providers
+    |--------------------------------------------------------------------------
+    |
+    | All authentication drivers have a user provider. This defines how the
+    | users are actually retrieved out of your database or other storage
+    | mechanisms used by this application to persist your user's data.
+    |
+    | If you have multiple user tables or models you may configure multiple
+    | sources which represent each model / table. These sources may then
+    | be assigned to any extra authentication guards you have defined.
+    |
+    | Supported: "database", "eloquent"
+    |
+    */
+
+    'providers' => [
+        'users' => [
+            'driver' => 'eloquent',
+            'model' => App\User::class,
+        ],
+
+        // 'users' => [
+        //     'driver' => 'database',
+        //     'table' => 'users',
+        // ],
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Resetting Passwords
+    |--------------------------------------------------------------------------
+    |
+    | You may specify multiple password reset configurations if you have more
+    | than one user table or model in the application and you want to have
+    | separate password reset settings based on the specific user types.
+    |
+    | The expire time is the number of minutes that the reset token should be
+    | considered valid. This security feature keeps tokens short-lived so
+    | they have less time to be guessed. You may change this as needed.
+    |
+    */
+
+    'passwords' => [
+        'users' => [
+            'provider' => 'users',
+            'table' => 'password_resets',
+            'expire' => 60,
+            'throttle' => 60,
+        ],
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Password Confirmation Timeout
+    |--------------------------------------------------------------------------
+    |
+    | Here you may define the amount of seconds before a password confirmation
+    | times out and the user is prompted to re-enter their password via the
+    | confirmation screen. By default, the timeout lasts for three hours.
+    |
+    */
+
+    'password_timeout' => 10800,
+
+];

+ 59 - 0
config/broadcasting.php

@@ -0,0 +1,59 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Broadcaster
+    |--------------------------------------------------------------------------
+    |
+    | This option controls the default broadcaster that will be used by the
+    | framework when an event needs to be broadcast. You may set this to
+    | any of the connections defined in the "connections" array below.
+    |
+    | Supported: "pusher", "redis", "log", "null"
+    |
+    */
+
+    'default' => env('BROADCAST_DRIVER', 'null'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Broadcast Connections
+    |--------------------------------------------------------------------------
+    |
+    | Here you may define all of the broadcast connections that will be used
+    | to broadcast events to other systems or over websockets. Samples of
+    | each available type of connection are provided inside this array.
+    |
+    */
+
+    'connections' => [
+
+        'pusher' => [
+            'driver' => 'pusher',
+            'key' => env('PUSHER_APP_KEY'),
+            'secret' => env('PUSHER_APP_SECRET'),
+            'app_id' => env('PUSHER_APP_ID'),
+            'options' => [
+                'cluster' => env('PUSHER_APP_CLUSTER'),
+                'useTLS' => true,
+            ],
+        ],
+
+        'redis' => [
+            'driver' => 'redis',
+            'connection' => 'default',
+        ],
+
+        'log' => [
+            'driver' => 'log',
+        ],
+
+        'null' => [
+            'driver' => 'null',
+        ],
+
+    ],
+
+];

+ 104 - 0
config/cache.php

@@ -0,0 +1,104 @@
+<?php
+
+use Illuminate\Support\Str;
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Cache Store
+    |--------------------------------------------------------------------------
+    |
+    | This option controls the default cache connection that gets used while
+    | using this caching library. This connection is used when another is
+    | not explicitly specified when executing a given caching function.
+    |
+    | Supported: "apc", "array", "database", "file",
+    |            "memcached", "redis", "dynamodb"
+    |
+    */
+
+    'default' => env('CACHE_DRIVER', 'file'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Cache Stores
+    |--------------------------------------------------------------------------
+    |
+    | Here you may define all of the cache "stores" for your application as
+    | well as their drivers. You may even define multiple stores for the
+    | same cache driver to group types of items stored in your caches.
+    |
+    */
+
+    'stores' => [
+
+        'apc' => [
+            'driver' => 'apc',
+        ],
+
+        'array' => [
+            'driver' => 'array',
+            'serialize' => false,
+        ],
+
+        'database' => [
+            'driver' => 'database',
+            'table' => 'cache',
+            'connection' => null,
+        ],
+
+        'file' => [
+            'driver' => 'file',
+            'path' => storage_path('framework/cache/data'),
+        ],
+
+        'memcached' => [
+            'driver' => 'memcached',
+            'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
+            'sasl' => [
+                env('MEMCACHED_USERNAME'),
+                env('MEMCACHED_PASSWORD'),
+            ],
+            'options' => [
+                // Memcached::OPT_CONNECT_TIMEOUT => 2000,
+            ],
+            'servers' => [
+                [
+                    'host' => env('MEMCACHED_HOST', '127.0.0.1'),
+                    'port' => env('MEMCACHED_PORT', 11211),
+                    'weight' => 100,
+                ],
+            ],
+        ],
+
+        'redis' => [
+            'driver' => 'redis',
+            'connection' => 'cache',
+        ],
+
+        'dynamodb' => [
+            'driver' => 'dynamodb',
+            'key' => env('AWS_ACCESS_KEY_ID'),
+            'secret' => env('AWS_SECRET_ACCESS_KEY'),
+            'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
+            'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
+            'endpoint' => env('DYNAMODB_ENDPOINT'),
+        ],
+
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Cache Key Prefix
+    |--------------------------------------------------------------------------
+    |
+    | When utilizing a RAM based store such as APC or Memcached, there might
+    | be other applications utilizing the same cache. So, we'll specify a
+    | value to get prefixed to all our keys so we can avoid collisions.
+    |
+    */
+
+    'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
+
+];

+ 34 - 0
config/cors.php

@@ -0,0 +1,34 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Cross-Origin Resource Sharing (CORS) Configuration
+    |--------------------------------------------------------------------------
+    |
+    | Here you may configure your settings for cross-origin resource sharing
+    | or "CORS". This determines what cross-origin operations may execute
+    | in web browsers. You are free to adjust these settings as needed.
+    |
+    | To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
+    |
+    */
+
+    'paths' => ['api/*'],
+
+    'allowed_methods' => ['*'],
+
+    'allowed_origins' => ['*'],
+
+    'allowed_origins_patterns' => [],
+
+    'allowed_headers' => ['*'],
+
+    'exposed_headers' => [],
+
+    'max_age' => 0,
+
+    'supports_credentials' => false,
+
+];

+ 147 - 0
config/database.php

@@ -0,0 +1,147 @@
+<?php
+
+use Illuminate\Support\Str;
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Database Connection Name
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify which of the database connections below you wish
+    | to use as your default connection for all database work. Of course
+    | you may use many connections at once using the Database library.
+    |
+    */
+
+    'default' => env('DB_CONNECTION', 'mysql'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Database Connections
+    |--------------------------------------------------------------------------
+    |
+    | Here are each of the database connections setup for your application.
+    | Of course, examples of configuring each database platform that is
+    | supported by Laravel is shown below to make development simple.
+    |
+    |
+    | All database work in Laravel is done through the PHP PDO facilities
+    | so make sure you have the driver for your particular database of
+    | choice installed on your machine before you begin development.
+    |
+    */
+
+    'connections' => [
+
+        'sqlite' => [
+            'driver' => 'sqlite',
+            'url' => env('DATABASE_URL'),
+            'database' => env('DB_DATABASE', database_path('database.sqlite')),
+            'prefix' => '',
+            'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
+        ],
+
+        'mysql' => [
+            'driver' => 'mysql',
+            'url' => env('DATABASE_URL'),
+            'host' => env('DB_HOST', '127.0.0.1'),
+            'port' => env('DB_PORT', '3306'),
+            'database' => env('DB_DATABASE', 'forge'),
+            'username' => env('DB_USERNAME', 'forge'),
+            'password' => env('DB_PASSWORD', ''),
+            'unix_socket' => env('DB_SOCKET', ''),
+            'charset' => 'utf8mb4',
+            'collation' => 'utf8mb4_unicode_ci',
+            'prefix' => '',
+            'prefix_indexes' => true,
+            'strict' => false,
+            'engine' => null,
+            'options' => extension_loaded('pdo_mysql') ? array_filter([
+                PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
+            ]) : [],
+        ],
+
+        'pgsql' => [
+            'driver' => 'pgsql',
+            'url' => env('DATABASE_URL'),
+            'host' => env('DB_HOST', '127.0.0.1'),
+            'port' => env('DB_PORT', '5432'),
+            'database' => env('DB_DATABASE', 'forge'),
+            'username' => env('DB_USERNAME', 'forge'),
+            'password' => env('DB_PASSWORD', ''),
+            'charset' => 'utf8',
+            'prefix' => '',
+            'prefix_indexes' => true,
+            'schema' => 'public',
+            'sslmode' => 'prefer',
+        ],
+
+        'sqlsrv' => [
+            'driver' => 'sqlsrv',
+            'url' => env('DATABASE_URL'),
+            'host' => env('DB_HOST', 'localhost'),
+            'port' => env('DB_PORT', '1433'),
+            'database' => env('DB_DATABASE', 'forge'),
+            'username' => env('DB_USERNAME', 'forge'),
+            'password' => env('DB_PASSWORD', ''),
+            'charset' => 'utf8',
+            'prefix' => '',
+            'prefix_indexes' => true,
+        ],
+
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Migration Repository Table
+    |--------------------------------------------------------------------------
+    |
+    | This table keeps track of all the migrations that have already run for
+    | your application. Using this information, we can determine which of
+    | the migrations on disk haven't actually been run in the database.
+    |
+    */
+
+    'migrations' => 'migrations',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Redis Databases
+    |--------------------------------------------------------------------------
+    |
+    | Redis is an open source, fast, and advanced key-value store that also
+    | provides a richer body of commands than a typical key-value system
+    | such as APC or Memcached. Laravel makes it easy to dig right in.
+    |
+    */
+
+    'redis' => [
+
+        'client' => env('REDIS_CLIENT', 'phpredis'),
+
+        'options' => [
+            'cluster' => env('REDIS_CLUSTER', 'redis'),
+            'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
+        ],
+
+        'default' => [
+            'url' => env('REDIS_URL'),
+            'host' => env('REDIS_HOST', '127.0.0.1'),
+            'password' => env('REDIS_PASSWORD', null),
+            'port' => env('REDIS_PORT', '6379'),
+            'database' => env('REDIS_DB', '0'),
+        ],
+
+        'cache' => [
+            'url' => env('REDIS_URL'),
+            'host' => env('REDIS_HOST', '127.0.0.1'),
+            'password' => env('REDIS_PASSWORD', null),
+            'port' => env('REDIS_PORT', '6379'),
+            'database' => env('REDIS_CACHE_DB', '1'),
+        ],
+
+    ],
+
+];

+ 85 - 0
config/filesystems.php

@@ -0,0 +1,85 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Filesystem Disk
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify the default filesystem disk that should be used
+    | by the framework. The "local" disk, as well as a variety of cloud
+    | based disks are available to your application. Just store away!
+    |
+    */
+
+    'default' => env('FILESYSTEM_DRIVER', 'local'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Cloud Filesystem Disk
+    |--------------------------------------------------------------------------
+    |
+    | Many applications store files both locally and in the cloud. For this
+    | reason, you may specify a default "cloud" driver here. This driver
+    | will be bound as the Cloud disk implementation in the container.
+    |
+    */
+
+    'cloud' => env('FILESYSTEM_CLOUD', 's3'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Filesystem Disks
+    |--------------------------------------------------------------------------
+    |
+    | Here you may configure as many filesystem "disks" as you wish, and you
+    | may even configure multiple disks of the same driver. Defaults have
+    | been setup for each driver as an example of the required options.
+    |
+    | Supported Drivers: "local", "ftp", "sftp", "s3"
+    |
+    */
+
+    'disks' => [
+
+        'local' => [
+            'driver' => 'local',
+            'root' => storage_path('app'),
+        ],
+
+        'public' => [
+            'driver' => 'local',
+            'root' => storage_path('app/public'),
+            'url' => env('APP_URL').'/storage',
+            'visibility' => 'public',
+        ],
+
+        's3' => [
+            'driver' => 's3',
+            'key' => env('AWS_ACCESS_KEY_ID'),
+            'secret' => env('AWS_SECRET_ACCESS_KEY'),
+            'region' => env('AWS_DEFAULT_REGION'),
+            'bucket' => env('AWS_BUCKET'),
+            'url' => env('AWS_URL'),
+            'endpoint' => env('AWS_ENDPOINT'),
+        ],
+
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Symbolic Links
+    |--------------------------------------------------------------------------
+    |
+    | Here you may configure the symbolic links that will be created when the
+    | `storage:link` Artisan command is executed. The array keys should be
+    | the locations of the links and the values should be their targets.
+    |
+    */
+
+    'links' => [
+        public_path('storage') => storage_path('app/public'),
+    ],
+
+];

+ 52 - 0
config/hashing.php

@@ -0,0 +1,52 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Hash Driver
+    |--------------------------------------------------------------------------
+    |
+    | This option controls the default hash driver that will be used to hash
+    | passwords for your application. By default, the bcrypt algorithm is
+    | used; however, you remain free to modify this option if you wish.
+    |
+    | Supported: "bcrypt", "argon", "argon2id"
+    |
+    */
+
+    'driver' => 'bcrypt',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Bcrypt Options
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify the configuration options that should be used when
+    | passwords are hashed using the Bcrypt algorithm. This will allow you
+    | to control the amount of time it takes to hash the given password.
+    |
+    */
+
+    'bcrypt' => [
+        'rounds' => env('BCRYPT_ROUNDS', 10),
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Argon Options
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify the configuration options that should be used when
+    | passwords are hashed using the Argon algorithm. These will allow you
+    | to control the amount of time it takes to hash the given password.
+    |
+    */
+
+    'argon' => [
+        'memory' => 1024,
+        'threads' => 2,
+        'time' => 2,
+    ],
+
+];

+ 104 - 0
config/logging.php

@@ -0,0 +1,104 @@
+<?php
+
+use Monolog\Handler\NullHandler;
+use Monolog\Handler\StreamHandler;
+use Monolog\Handler\SyslogUdpHandler;
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Log Channel
+    |--------------------------------------------------------------------------
+    |
+    | This option defines the default log channel that gets used when writing
+    | messages to the logs. The name specified in this option should match
+    | one of the channels defined in the "channels" configuration array.
+    |
+    */
+
+    'default' => env('LOG_CHANNEL', 'stack'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Log Channels
+    |--------------------------------------------------------------------------
+    |
+    | Here you may configure the log channels for your application. Out of
+    | the box, Laravel uses the Monolog PHP logging library. This gives
+    | you a variety of powerful log handlers / formatters to utilize.
+    |
+    | Available Drivers: "single", "daily", "slack", "syslog",
+    |                    "errorlog", "monolog",
+    |                    "custom", "stack"
+    |
+    */
+
+    'channels' => [
+        'stack' => [
+            'driver' => 'stack',
+            'channels' => ['single'],
+            'ignore_exceptions' => false,
+        ],
+
+        'single' => [
+            'driver' => 'single',
+            'path' => storage_path('logs/laravel.log'),
+            'level' => 'debug',
+        ],
+
+        'daily' => [
+            'driver' => 'daily',
+            'path' => storage_path('logs/laravel.log'),
+            'level' => 'debug',
+            'days' => 14,
+        ],
+
+        'slack' => [
+            'driver' => 'slack',
+            'url' => env('LOG_SLACK_WEBHOOK_URL'),
+            'username' => 'Laravel Log',
+            'emoji' => ':boom:',
+            'level' => 'critical',
+        ],
+
+        'papertrail' => [
+            'driver' => 'monolog',
+            'level' => 'debug',
+            'handler' => SyslogUdpHandler::class,
+            'handler_with' => [
+                'host' => env('PAPERTRAIL_URL'),
+                'port' => env('PAPERTRAIL_PORT'),
+            ],
+        ],
+
+        'stderr' => [
+            'driver' => 'monolog',
+            'handler' => StreamHandler::class,
+            'formatter' => env('LOG_STDERR_FORMATTER'),
+            'with' => [
+                'stream' => 'php://stderr',
+            ],
+        ],
+
+        'syslog' => [
+            'driver' => 'syslog',
+            'level' => 'debug',
+        ],
+
+        'errorlog' => [
+            'driver' => 'errorlog',
+            'level' => 'debug',
+        ],
+
+        'null' => [
+            'driver' => 'monolog',
+            'handler' => NullHandler::class,
+        ],
+
+        'emergency' => [
+            'path' => storage_path('logs/laravel.log'),
+        ],
+    ],
+
+];

+ 110 - 0
config/mail.php

@@ -0,0 +1,110 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Mailer
+    |--------------------------------------------------------------------------
+    |
+    | This option controls the default mailer that is used to send any email
+    | messages sent by your application. Alternative mailers may be setup
+    | and used as needed; however, this mailer will be used by default.
+    |
+    */
+
+    'default' => env('MAIL_MAILER', 'smtp'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Mailer Configurations
+    |--------------------------------------------------------------------------
+    |
+    | Here you may configure all of the mailers used by your application plus
+    | their respective settings. Several examples have been configured for
+    | you and you are free to add your own as your application requires.
+    |
+    | Laravel supports a variety of mail "transport" drivers to be used while
+    | sending an e-mail. You will specify which one you are using for your
+    | mailers below. You are free to add additional mailers as required.
+    |
+    | Supported: "smtp", "sendmail", "mailgun", "ses",
+    |            "postmark", "log", "array"
+    |
+    */
+
+    'mailers' => [
+        'smtp' => [
+            'transport' => 'smtp',
+            'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
+            'port' => env('MAIL_PORT', 587),
+            'encryption' => env('MAIL_ENCRYPTION', 'tls'),
+            'username' => env('MAIL_USERNAME'),
+            'password' => env('MAIL_PASSWORD'),
+            'timeout' => null,
+            'auth_mode' => null,
+        ],
+
+        'ses' => [
+            'transport' => 'ses',
+        ],
+
+        'mailgun' => [
+            'transport' => 'mailgun',
+        ],
+
+        'postmark' => [
+            'transport' => 'postmark',
+        ],
+
+        'sendmail' => [
+            'transport' => 'sendmail',
+            'path' => '/usr/sbin/sendmail -bs',
+        ],
+
+        'log' => [
+            'transport' => 'log',
+            'channel' => env('MAIL_LOG_CHANNEL'),
+        ],
+
+        'array' => [
+            'transport' => 'array',
+        ],
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Global "From" Address
+    |--------------------------------------------------------------------------
+    |
+    | You may wish for all e-mails sent by your application to be sent from
+    | the same address. Here, you may specify a name and address that is
+    | used globally for all e-mails that are sent by your application.
+    |
+    */
+
+    'from' => [
+        'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
+        'name' => env('MAIL_FROM_NAME', 'Example'),
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Markdown Mail Settings
+    |--------------------------------------------------------------------------
+    |
+    | If you are using Markdown based email rendering, you may configure your
+    | theme and component paths here, allowing you to customize the design
+    | of the emails. Or, you may simply stick with the Laravel defaults!
+    |
+    */
+
+    'markdown' => [
+        'theme' => 'default',
+
+        'paths' => [
+            resource_path('views/vendor/mail'),
+        ],
+    ],
+
+];

+ 89 - 0
config/queue.php

@@ -0,0 +1,89 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Queue Connection Name
+    |--------------------------------------------------------------------------
+    |
+    | Laravel's queue API supports an assortment of back-ends via a single
+    | API, giving you convenient access to each back-end using the same
+    | syntax for every one. Here you may define a default connection.
+    |
+    */
+
+    'default' => env('QUEUE_CONNECTION', 'sync'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Queue Connections
+    |--------------------------------------------------------------------------
+    |
+    | Here you may configure the connection information for each server that
+    | is used by your application. A default configuration has been added
+    | for each back-end shipped with Laravel. You are free to add more.
+    |
+    | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
+    |
+    */
+
+    'connections' => [
+
+        'sync' => [
+            'driver' => 'sync',
+        ],
+
+        'database' => [
+            'driver' => 'database',
+            'table' => 'jobs',
+            'queue' => 'default',
+            'retry_after' => 90,
+        ],
+
+        'beanstalkd' => [
+            'driver' => 'beanstalkd',
+            'host' => 'localhost',
+            'queue' => 'default',
+            'retry_after' => 90,
+            'block_for' => 0,
+        ],
+
+        'sqs' => [
+            'driver' => 'sqs',
+            'key' => env('AWS_ACCESS_KEY_ID'),
+            'secret' => env('AWS_SECRET_ACCESS_KEY'),
+            'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
+            'queue' => env('SQS_QUEUE', 'your-queue-name'),
+            'suffix' => env('SQS_SUFFIX'),
+            'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
+        ],
+
+        'redis' => [
+            'driver' => 'redis',
+            'connection' => 'default',
+            'queue' => env('REDIS_QUEUE', 'default'),
+            'retry_after' => 90,
+            'block_for' => null,
+        ],
+
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Failed Queue Jobs
+    |--------------------------------------------------------------------------
+    |
+    | These options configure the behavior of failed queue job logging so you
+    | can control which database and table are used to store the jobs that
+    | have failed. You may change them to any database / table you wish.
+    |
+    */
+
+    'failed' => [
+        'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
+        'database' => env('DB_CONNECTION', 'mysql'),
+        'table' => 'failed_jobs',
+    ],
+
+];

+ 46 - 0
config/services.php

@@ -0,0 +1,46 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Third Party Services
+    |--------------------------------------------------------------------------
+    |
+    | This file is for storing the credentials for third party services such
+    | as Mailgun, Postmark, AWS and more. This file provides the de facto
+    | location for this type of information, allowing packages to have
+    | a conventional file to locate the various service credentials.
+    |
+    */
+
+    'mailgun' => [
+        'domain' => env('MAILGUN_DOMAIN'),
+        'secret' => env('MAILGUN_SECRET'),
+        'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
+    ],
+
+    'postmark' => [
+        'token' => env('POSTMARK_TOKEN'),
+    ],
+
+    'ses' => [
+        'key' => env('AWS_ACCESS_KEY_ID'),
+        'secret' => env('AWS_SECRET_ACCESS_KEY'),
+        'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
+    ],
+
+    'facebook_poster' => [
+        'client_id' => env('FACEBOOK_APP_ID', '184440700033999'),
+        'client_secret' => env('FACEBOOK_APP_SECRET', '8d746ffe0ba69ea98e111035f683191a'),
+        'access_token' => env('FACEBOOK_ACCESS_TOKEN', 'EAACnv3JoW88BAFN3YnCLP2cmuZArhsOHhpRGOlMkZBfJMqEOe5qqC0fPYNg1GbMmhVkMZCnJafsHfJciZA73lxWQZBBLhxjYzlNEjygvxZBDnxVdTcZBrh4oZBZClWtAF827u8A9HY5IbWwAI7Q3AZB2XuowSwnUFjzXGanffeJ7ImJW1re5hWZCHP0gPxwXjmTgKYZD'),
+    ],
+
+    'twitter' => [
+        'consumer_key'    => env('TWITTER_CONSUMER_KEY', 'MEhB239QILqDmIqtLSs9we8td'),
+        'consumer_secret' => env('TWITTER_CONSUMER_SECRET', 'K74IAw41l8tfOM429NR7pd4zNkE0k1bYzSc8zWBqsxsKYidzjM'),
+        'access_token'    => env('TWITTER_ACCESS_TOKEN', '358832710-rBGLPHvaN3dv8gls2D0QQilL2UxHk2c8b1WKFW7a'),
+        'access_secret'   => env('TWITTER_ACCESS_SECRET', 'JpabfGcQHM3Xe73gG7djmpPZPNgSjwhCyMF8eIhyCjFUZ')
+    ],
+
+];

+ 201 - 0
config/session.php

@@ -0,0 +1,201 @@
+<?php
+
+use Illuminate\Support\Str;
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Default Session Driver
+    |--------------------------------------------------------------------------
+    |
+    | This option controls the default session "driver" that will be used on
+    | requests. By default, we will use the lightweight native driver but
+    | you may specify any of the other wonderful drivers provided here.
+    |
+    | Supported: "file", "cookie", "database", "apc",
+    |            "memcached", "redis", "dynamodb", "array"
+    |
+    */
+
+    'driver' => env('SESSION_DRIVER', 'file'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Session Lifetime
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify the number of minutes that you wish the session
+    | to be allowed to remain idle before it expires. If you want them
+    | to immediately expire on the browser closing, set that option.
+    |
+    */
+
+    'lifetime' => env('SESSION_LIFETIME', 120),
+
+    'expire_on_close' => false,
+
+    /*
+    |--------------------------------------------------------------------------
+    | Session Encryption
+    |--------------------------------------------------------------------------
+    |
+    | This option allows you to easily specify that all of your session data
+    | should be encrypted before it is stored. All encryption will be run
+    | automatically by Laravel and you can use the Session like normal.
+    |
+    */
+
+    'encrypt' => false,
+
+    /*
+    |--------------------------------------------------------------------------
+    | Session File Location
+    |--------------------------------------------------------------------------
+    |
+    | When using the native session driver, we need a location where session
+    | files may be stored. A default has been set for you but a different
+    | location may be specified. This is only needed for file sessions.
+    |
+    */
+
+    'files' => storage_path('framework/sessions'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Session Database Connection
+    |--------------------------------------------------------------------------
+    |
+    | When using the "database" or "redis" session drivers, you may specify a
+    | connection that should be used to manage these sessions. This should
+    | correspond to a connection in your database configuration options.
+    |
+    */
+
+    'connection' => env('SESSION_CONNECTION', null),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Session Database Table
+    |--------------------------------------------------------------------------
+    |
+    | When using the "database" session driver, you may specify the table we
+    | should use to manage the sessions. Of course, a sensible default is
+    | provided for you; however, you are free to change this as needed.
+    |
+    */
+
+    'table' => 'sessions',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Session Cache Store
+    |--------------------------------------------------------------------------
+    |
+    | While using one of the framework's cache driven session backends you may
+    | list a cache store that should be used for these sessions. This value
+    | must match with one of the application's configured cache "stores".
+    |
+    | Affects: "apc", "dynamodb", "memcached", "redis"
+    |
+    */
+
+    'store' => env('SESSION_STORE', null),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Session Sweeping Lottery
+    |--------------------------------------------------------------------------
+    |
+    | Some session drivers must manually sweep their storage location to get
+    | rid of old sessions from storage. Here are the chances that it will
+    | happen on a given request. By default, the odds are 2 out of 100.
+    |
+    */
+
+    'lottery' => [2, 100],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Session Cookie Name
+    |--------------------------------------------------------------------------
+    |
+    | Here you may change the name of the cookie used to identify a session
+    | instance by ID. The name specified here will get used every time a
+    | new session cookie is created by the framework for every driver.
+    |
+    */
+
+    'cookie' => env(
+        'SESSION_COOKIE',
+        Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
+    ),
+
+    /*
+    |--------------------------------------------------------------------------
+    | Session Cookie Path
+    |--------------------------------------------------------------------------
+    |
+    | The session cookie path determines the path for which the cookie will
+    | be regarded as available. Typically, this will be the root path of
+    | your application but you are free to change this when necessary.
+    |
+    */
+
+    'path' => '/',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Session Cookie Domain
+    |--------------------------------------------------------------------------
+    |
+    | Here you may change the domain of the cookie used to identify a session
+    | in your application. This will determine which domains the cookie is
+    | available to in your application. A sensible default has been set.
+    |
+    */
+
+    'domain' => env('SESSION_DOMAIN', null),
+
+    /*
+    |--------------------------------------------------------------------------
+    | HTTPS Only Cookies
+    |--------------------------------------------------------------------------
+    |
+    | By setting this option to true, session cookies will only be sent back
+    | to the server if the browser has a HTTPS connection. This will keep
+    | the cookie from being sent to you if it can not be done securely.
+    |
+    */
+
+    'secure' => env('SESSION_SECURE_COOKIE'),
+
+    /*
+    |--------------------------------------------------------------------------
+    | HTTP Access Only
+    |--------------------------------------------------------------------------
+    |
+    | Setting this value to true will prevent JavaScript from accessing the
+    | value of the cookie and the cookie will only be accessible through
+    | the HTTP protocol. You are free to modify this option if needed.
+    |
+    */
+
+    'http_only' => true,
+
+    /*
+    |--------------------------------------------------------------------------
+    | Same-Site Cookies
+    |--------------------------------------------------------------------------
+    |
+    | This option determines how your cookies behave when cross-site requests
+    | take place, and can be used to mitigate CSRF attacks. By default, we
+    | will set this value to "lax" since this is a secure default value.
+    |
+    | Supported: "lax", "strict", "none", null
+    |
+    */
+
+    'same_site' => 'lax',
+
+];

+ 14 - 0
config/sitemap.php

@@ -0,0 +1,14 @@
+<?php
+
+/* Simple configuration file for Laravel Sitemap package */
+return [
+    'use_cache' => false,
+    'cache_key' => 'laravel-sitemap.'.config('app.url'),
+    'cache_duration' => 3600,
+    'escaping' => true,
+    'use_limit_size' => false,
+    'max_size' => null,
+    'use_styles' => true,
+    'styles_location' => '/vendor/sitemap/styles/',
+    'use_gzip' => false
+];

+ 36 - 0
config/view.php

@@ -0,0 +1,36 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | View Storage Paths
+    |--------------------------------------------------------------------------
+    |
+    | Most templating systems load templates from disk. Here you may specify
+    | an array of paths that should be checked for your views. Of course
+    | the usual Laravel view path has already been registered for you.
+    |
+    */
+
+    'paths' => [
+        resource_path('views'),
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Compiled View Path
+    |--------------------------------------------------------------------------
+    |
+    | This option determines where all the compiled Blade templates will be
+    | stored for your application. Typically, this is within the storage
+    | directory. However, as usual, you are free to change this value.
+    |
+    */
+
+    'compiled' => env(
+        'VIEW_COMPILED_PATH',
+        realpath(storage_path('framework/views'))
+    ),
+
+];

BIN
database/.DS_Store


+ 2 - 0
database/.gitignore

@@ -0,0 +1,2 @@
+*.sqlite
+*.sqlite-journal

+ 28 - 0
database/factories/UserFactory.php

@@ -0,0 +1,28 @@
+<?php
+
+/** @var \Illuminate\Database\Eloquent\Factory $factory */
+
+use App\User;
+use Faker\Generator as Faker;
+use Illuminate\Support\Str;
+
+/*
+|--------------------------------------------------------------------------
+| Model Factories
+|--------------------------------------------------------------------------
+|
+| This directory should contain each of the model factory definitions for
+| your application. Factories provide a convenient way to generate new
+| model instances for testing / seeding your application's database.
+|
+*/
+
+$factory->define(User::class, function (Faker $faker) {
+    return [
+        'name' => $faker->name,
+        'email' => $faker->unique()->safeEmail,
+        'email_verified_at' => now(),
+        'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
+        'remember_token' => Str::random(10),
+    ];
+});

BIN
database/migrations/.DS_Store


+ 38 - 0
database/migrations/2014_10_12_000000_create_users_table.php

@@ -0,0 +1,38 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateUsersTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('users', function (Blueprint $table) {
+            $table->id();
+            $table->string('name');
+            $table->string('email')->unique();
+            $table->timestamp('email_verified_at')->nullable();
+            $table->string('password');
+            $table->boolean('disabled')->default(false);
+            $table->integer('level')->default(0);
+            $table->rememberToken();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('users');
+    }
+}

+ 35 - 0
database/migrations/2019_08_19_000000_create_failed_jobs_table.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateFailedJobsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('failed_jobs', function (Blueprint $table) {
+            $table->id();
+            $table->text('connection');
+            $table->text('queue');
+            $table->longText('payload');
+            $table->longText('exception');
+            $table->timestamp('failed_at')->useCurrent();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('failed_jobs');
+    }
+}

+ 34 - 0
database/migrations/2020_06_09_104500_create_sections_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateSectionsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('sections', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('name');
+            $table->string('type');
+            $table->integer('position')->default(0);
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('sections');
+    }
+}

+ 46 - 0
database/migrations/2020_06_09_114500_create_news_table.php

@@ -0,0 +1,46 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateNewsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('news', function (Blueprint $table) {
+            $table->increments('id');
+            $table->integer('section_id')->unsigned()->nullable();
+            $table->foreign('section_id')->references('id')->on('sections');
+            $table->integer('region_1_id')->unsigned()->nullable();
+            $table->foreign('region_1_id')->references('id')->on('sections');
+            $table->integer('region_2_id')->unsigned()->nullable();
+            $table->foreign('region_2_id')->references('id')->on('sections');
+            $table->string('title');
+            $table->string('title_region_1')->nullable();
+            $table->string('title_region_2')->nullable();
+            $table->string('text_short')->nullable();
+            $table->text('text')->nullable();
+            $table->string('image')->nullable();
+            $table->boolean('online');
+            $table->boolean('homepage');
+            $table->datetime('date')->nullable();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('news');
+    }
+}

+ 40 - 0
database/migrations/2020_06_12_164000_add_meta_fields_to_news_table.php

@@ -0,0 +1,40 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddMetaFieldsToNewsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('news', function (Blueprint $table) {
+            $table->string('slug')->nullable();
+            $table->string('meta_title')->nullable();
+            $table->text('meta_description')->nullable();
+            $table->string('meta_keywords')->nullable();
+            $table->boolean('live')->nullable()->default(false);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('news', function (Blueprint $table) {
+            $table->dropColumn('slug');
+            $table->dropColumn('meta_title');
+            $table->dropColumn('meta_description');
+            $table->dropColumn('meta_keywords');
+            $table->dropColumn('live');
+        });
+    }
+}

+ 52 - 0
database/migrations/2020_06_15_092000_add_layout_fields_to_sections_table.php

@@ -0,0 +1,52 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddLayoutFieldsToSectionsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('sections', function (Blueprint $table) {
+            $table->string('layout')->nullable();
+            $table->string('big')->nullable();
+            $table->string('medium1')->nullable();
+            $table->string('medium2')->nullable();
+            $table->string('medium3')->nullable();
+            $table->string('small1')->nullable();
+            $table->string('small2')->nullable();
+            $table->string('small3')->nullable();
+            $table->string('small4')->nullable();
+            $table->string('small5')->nullable();
+            $table->string('small6')->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('sections', function (Blueprint $table) {
+            $table->dropColumn('layout');
+            $table->dropColumn('big');
+            $table->dropColumn('medium1');
+            $table->dropColumn('medium2');
+            $table->dropColumn('medium3');
+            $table->dropColumn('small1');
+            $table->dropColumn('small2');
+            $table->dropColumn('small3');
+            $table->dropColumn('small4');
+            $table->dropColumn('small5');
+            $table->dropColumn('small6');
+        });
+    }
+}

+ 32 - 0
database/migrations/2020_06_17_123000_add_slug_to_sections_table.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddSlugToSectionsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('sections', function (Blueprint $table) {
+            $table->string('slug')->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('sections', function (Blueprint $table) {
+            $table->dropColumn('slug');
+        });
+    }
+}

+ 34 - 0
database/migrations/2020_06_17_143000_add_before_after_to_sections_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddBeforeAfterToSectionsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('sections', function (Blueprint $table) {
+            $table->boolean('before')->nullable()->default(false);
+            $table->boolean('after')->nullable()->default(false);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('sections', function (Blueprint $table) {
+            $table->dropColumn('before');
+            $table->dropColumn('after');
+        });
+    }
+}

+ 38 - 0
database/migrations/2020_06_17_163000_create_home_table.php

@@ -0,0 +1,38 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateHomeTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('home', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('slide1')->nullable();
+            $table->string('slide2')->nullable();
+            $table->string('slide3')->nullable();
+            $table->string('slide4')->nullable();
+            $table->string('slide5')->nullable();
+            $table->string('left')->nullable();
+            $table->string('right')->nullable();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('home');
+    }
+}

+ 42 - 0
database/migrations/2020_06_17_213000_add_files_fields_to_news_table.php

@@ -0,0 +1,42 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddFilesFieldsToNewsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('news', function (Blueprint $table) {
+            $table->string('image1')->nullable();
+            $table->string('image2')->nullable();
+            $table->string('image3')->nullable();
+            $table->string('image4')->nullable();
+            $table->string('image5')->nullable();
+            $table->text('video')->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('news', function (Blueprint $table) {
+            $table->dropColumn('image1');
+            $table->dropColumn('image2');
+            $table->dropColumn('image3');
+            $table->dropColumn('image4');
+            $table->dropColumn('image5');
+            $table->dropColumn('video');
+        });
+    }
+}

+ 43 - 0
database/migrations/2020_06_23_123000_create_pages_table.php

@@ -0,0 +1,43 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePagesTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('pages', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('title');
+            $table->string('text_short')->nullable();
+            $table->text('text')->nullable();
+            $table->string('slug')->nullable();
+            $table->string('image')->nullable();
+            $table->boolean('online');
+            $table->string('web')->nullable();
+            $table->string('email')->nullable();
+            $table->string('facebook')->nullable();
+            $table->string('instagram')->nullable();
+            $table->string('twitter')->nullable();
+            $table->string('youtube')->nullable();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('pages');
+    }
+}

+ 37 - 0
database/migrations/2020_06_23_123100_create_events_table.php

@@ -0,0 +1,37 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateEventsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('events', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('title');
+            $table->string('text_short')->nullable();
+            $table->text('text')->nullable();
+            $table->string('slug')->nullable();
+            $table->string('image')->nullable();
+            $table->boolean('online');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('events');
+    }
+}

+ 40 - 0
database/migrations/2020_06_29_151000_create_section_advs_table.php

@@ -0,0 +1,40 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateSectionAdvsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('section_advs', function (Blueprint $table) {
+            $table->increments('id');
+            $table->integer('section_id')->unsigned()->nullable();
+            $table->foreign('section_id')->references('id')->on('sections');
+            $table->string('name');
+            $table->string('position')->nullable();
+            $table->string('google_code')->nullable();
+            $table->string('image')->nullable();
+            $table->string('jingle')->nullable();
+            $table->string('url')->nullable();
+            $table->boolean('online');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('section_advs');
+    }
+}

+ 40 - 0
database/migrations/2020_06_29_151100_create_page_advs_table.php

@@ -0,0 +1,40 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePageAdvsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('page_advs', function (Blueprint $table) {
+            $table->increments('id');
+            $table->integer('page_id')->unsigned()->nullable();
+            $table->foreign('page_id')->references('id')->on('pages');
+            $table->string('name');
+            $table->string('position')->nullable();
+            $table->string('google_code')->nullable();
+            $table->string('image')->nullable();
+            $table->string('jingle')->nullable();
+            $table->string('url')->nullable();
+            $table->boolean('online');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('page_advs');
+    }
+}

+ 36 - 0
database/migrations/2020_06_29_173700_add_relation_fields_to_news_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddRelationFieldsToNewsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('news', function (Blueprint $table) {
+            $table->integer('event_id')->unsigned()->nullable();
+            $table->foreign('event_id')->references('id')->on('events');
+            $table->integer('page_id')->unsigned()->nullable();
+            $table->foreign('page_id')->references('id')->on('pages');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('news', function (Blueprint $table) {
+            $table->dropColumn('event_id');
+            $table->dropColumn('page_id');
+        });
+    }
+}

+ 34 - 0
database/migrations/2020_07_07_161000_add_adv_fields_to_home_table.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddAdvFieldsToHomeTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('home', function (Blueprint $table) {
+            $table->string('image')->nullable();
+            $table->string('url')->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('home', function (Blueprint $table) {
+            $table->dropColumn('image');
+            $table->dropColumn('url');
+        });
+    }
+}

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels