"psr-4": {
                    "Intervention\\Image\\": "src/Intervention/Image"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Oliver Vogel",
                    "email": "oliver@intervention.io",
                    "homepage": "https://intervention.io/"
                }
            ],
            "description": "Image handling and manipulation library with support for Laravel integration",
            "homepage": "http://image.intervention.io/",
            "keywords": [
                "gd",
                "image",
                "imagick",
                "laravel",
                "thumbnail",
                "watermark"
            ],
            "support": {
                "issues": "https://github.com/Intervention/image/issues",
                "source": "https://github.com/Intervention/image/tree/2.7.2"
            },
            "funding": [
                {
                    "url": "https://paypal.me/interventionio",
                    "type": "custom"
                },
                {
                    "url": "https://github.com/Intervention",
                    "type": "github"
                }
            ],
            "time": "2022-05-21T17:30:32+00:00"
        },
        {
            "name": "laravel/framework",
            "version": "v10.42.0",
            "source": {
                "type": "git",
                "url": "https://github.com/laravel/framework.git",
                "reference": "fef1aff874a6749c44f8e142e5764eab8cb96890"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/laravel/framework/zipball/fef1aff874a6749c44f8e142e5764eab8cb96890",
                "reference": "fef1aff874a6749c44f8e142e5764eab8cb96890",
                "shasum": ""
            },
            "require": {
                "brick/math": "^0.9.3|^0.10.2|^0.11",
                "composer-runtime-api": "^2.2",
                "doctrine/inflector": "^2.0.5",
                "dragonmantank/cron-expression": "^3.3.2",
                "egulias/email-validator": "^3.2.1|^4.0",
                "ext-ctype": "*",
                "ext-filter": "*",
                "ext-hash": "*",
                "ext-mbstring": "*",
                "ext-openssl": "*",
                "ext-session": "*",
                "ext-tokenizer": "*",
                "fruitcake/php-cors": "^1.2",
                "guzzlehttp/uri-template": "^1.0",
                "laravel/prompts": "^0.1.9",
                "laravel/serializable-closure": "^1.3",
                "league/commonmark": "^2.2.1",
                "league/flysystem": "^3.8.0",
                "monolog/monolog": "^3.0",
                "nesbot/carbon": "^2.67",
                "nunomaduro/termwind": "^1.13",
                "php": "^8.1",
                "psr/container": "^1.1.1|^2.0.1",
                "psr/log": "^1.0|^2.0|^3.0",
                "psr/simple-cache": "^1.0|^2.0|^3.0",
                "ramsey/uuid": "^4.7",
                "symfony/console": "^6.2",
                "symfony/error-handler": "^6.2",
                "symfony/finder": "^6.2",
                "symfony/http-foundation": "^6.4",
                "symfony/http-kernel": "^6.2",
                "symfony/mailer": "^6.2",
                "symfony/mime": "^6.2",
                "symfony/process": "^6.2",
                "symfony/routing": "^6.2",
                "symfony/uid": "^6.2",
                "symfony/var-dumper": "^6.2",
                "tijsverkoyen/css-to-inline-styles": "^2.2.5",
                "vlucas/phpdotenv": "^5.4.1",
                "voku/portable-ascii": "^2.0"
            },
            "conflict": {
                "carbonphp/carbon-doctrine-types": ">=3.0",
                "doctrine/dbal": ">=4.0",
                "tightenco/collect": "<5.5.33"
            },
            "provide": {
                "psr/container-implementation": "1.1|2.0",
                "psr/simple-cache-implementation": "1.0|2.0|3.0"
            },
            "replace": {
                "illuminate/auth": "self.version",
                "illuminate/broadcasting": "self.version",
                "illuminate/bus": "self.version",
                "illuminate/cache": "self.version",
                "illuminate/collections": "self.version",
                "illuminate/conditionable": "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/macroable": "self.version",
                "illuminate/mail": "self.version",
                "illuminate/notifications": "self.version",
                "illuminate/pagination": "self.version",
                "illuminate/pipeline": "self.version",
                "illuminate/process": "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": {
                "ably/ably-php": "^1.0",
                "aws/aws-sdk-php": "^3.235.5",
                "doctrine/dbal": "^3.5.1",
                "ext-gmp": "*",
                "fakerphp/faker": "^1.21",
                "guzzlehttp/guzzle": "^7.5",
                "league/flysystem-aws-s3-v3": "^3.0",
                "league/flysystem-ftp": "^3.0",
                "league/flysystem-path-prefixing": "^3.3",
                "league/flysystem-read-only": "^3.3",
                "league/flysystem-sftp-v3": "^3.0",
                "mockery/mockery": "^1.5.1",
                "nyholm/psr7": "^1.2",
                "orchestra/testbench-core": "^8.18",
                "pda/pheanstalk": "^4.0",
                "phpstan/phpstan": "^1.4.7",
                "phpunit/phpunit": "^10.0.7",
                "predis/predis": "^2.0.2",
                "symfony/cache": "^6.2",
                "symfony/http-client": "^6.2.4",
                "symfony/psr-http-message-bridge": "^2.0"
            },
            "suggest": {
                "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",
                "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).",
                "brianium/paratest": "Required to run tests in parallel (^6.0).",
                "doctrine/dbal": "Required to rename columns and drop SQLite columns (^3.5.1).",
                "ext-apcu": "Required to use the APC cache driver.",
                "ext-fileinfo": "Required to use the Filesystem class.",
                "ext-ftp": "Required to use the Flysystem FTP driver.",
                "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 and console signal trapping.",
                "ext-pdo": "Required to use all database features.",
                "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).",
                "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",


"filp/whoops": "Required for friendly error pages in development (^2.14.3).",
                "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.5).",
                "laravel/tinker": "Required to use the tinker console command (^2.0).",
                "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).",
                "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).",
                "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).",
                "league/flysystem-read-only": "Required to use read-only disks (^3.3)",
                "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).",
                "mockery/mockery": "Required to use mocking (^1.5.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 (^9.5.8|^10.0.7).",
                "predis/predis": "Required to use the predis connector (^2.0.2).",
                "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 (^6.0|^7.0).",
                "symfony/cache": "Required to PSR-6 cache bridge (^6.2).",
                "symfony/filesystem": "Required to enable support for relative symbolic links (^6.2).",
                "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.2).",
                "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.2).",
                "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.2).",
                "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)."
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "10.x-dev"
                }
            },
            "autoload": {
                "files": [
                    "src/Illuminate/Collections/helpers.php",
                    "src/Illuminate/Events/functions.php",
                    "src/Illuminate/Filesystem/functions.php",
                    "src/Illuminate/Foundation/helpers.php",
                    "src/Illuminate/Support/helpers.php"
                ],
                "psr-4": {
                    "Illuminate\\": "src/Illuminate/",
                    "Illuminate\\Support\\": [
                        "src/Illuminate/Macroable/",
                        "src/Illuminate/Collections/",
                        "src/Illuminate/Conditionable/"
                    ]
                }
            },
            "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"
            ],
            "support": {
                "issues": "https://github.com/laravel/framework/issues",
                "source": "https://github.com/laravel/framework"
            },
            "time": "2024-01-23T15:07:56+00:00"
        },
        {
            "name": "laravel/prompts",
            "version": "v0.1.15",
            "source": {
                "type": "git",
                "url": "https://github.com/laravel/prompts.git",
                "reference": "d814a27514d99b03c85aa42b22cfd946568636c1"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/laravel/prompts/zipball/d814a27514d99b03c85aa42b22cfd946568636c1",
                "reference": "d814a27514d99b03c85aa42b22cfd946568636c1",
                "shasum": ""
            },
            "require": {
                "ext-mbstring": "*",
                "illuminate/collections": "^10.0|^11.0",
                "php": "^8.1",
                "symfony/console": "^6.2|^7.0"
            },
            "conflict": {
                "illuminate/console": ">=10.17.0 <10.25.0",
                "laravel/framework": ">=10.17.0 <10.25.0"
            },
            "require-dev": {
                "mockery/mockery": "^1.5",
                "pestphp/pest": "^2.3",
                "phpstan/phpstan": "^1.11",
                "phpstan/phpstan-mockery": "^1.1"
            },
            "suggest": {
                "ext-pcntl": "Required for the spinner to be animated."
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-main": "0.1.x-dev"
                }
            },
            "autoload": {
                "files": [
                    "src/helpers.php"
                ],
                "psr-4": {
                    "Laravel\\Prompts\\": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "support": {
                "issues": "https://github.com/laravel/prompts/issues",
                "source": "https://github.com/laravel/prompts/tree/v0.1.15"
            },
            "time": "2023-12-29T22:37:42+00:00"
        },
        {
            "name": "laravel/sanctum",
            "version": "v3.3.3",
            "source": {
                "type": "git",
                "url": "https://github.com/laravel/sanctum.git",
                "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/laravel/sanctum/zipball/8c104366459739f3ada0e994bcd3e6fd681ce3d5",
                "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5",
                "shasum": ""
            },
            "require": {
                "ext-json": "*",
                "illuminate/console": "^9.21|^10.0",
                "illuminate/contracts": "^9.21|^10.0",
                "illuminate/database": "^9.21|^10.0",
                "illuminate/support": "^9.21|^10.0",
                "php": "^8.0.2"
            },
            "require-dev": {
                "mockery/mockery": "^1.0",
                "orchestra/testbench": "^7.28.2|^8.8.3",
                "phpstan/phpstan": "^1.10",
                "phpunit/phpunit": "^9.6"
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "3.x-dev"
                },
                "laravel": {
                    "providers": [
                        "Laravel\\Sanctum\\SanctumServiceProvider"
                    ]
                }
            },
            "autoload": {
                "psr-4": {
                    "Laravel\\Sanctum\\": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Taylor Otwell",
                    "email": "taylor@laravel.com"
                }
            ],
            "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.",
            "keywords": [
                "auth",
                "laravel",
                "sanctum"
            ],
            "support": {
                "issues": "https://github.com/laravel/sanctum/issues",
                "source": "https://github.com/laravel/sanctum"
            },
            "time": "2023-12-19T18:44:48+00:00"
        },
        {
            "name": "laravel/serializable-closure",
            "version": "v1.3.3",
            "source": {
                "type": "git",
                "url": "https://github.com/laravel/serializable-closure.git",
                "reference": "3dbf8a8e914634c48d389c1234552666b3d43754"
            },
            "dist": {
                "type": "zip",


"openai-php/client": "Require get solutions from OpenAI",
                "simple-cache-implementation": "To cache solutions from OpenAI"
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-main": "1.5.x-dev"
                }
            },
            "autoload": {
                "psr-4": {
                    "Spatie\\Ignition\\": "src"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Spatie",
                    "email": "info@spatie.be",
                    "role": "Developer"
                }
            ],
            "description": "A beautiful error page for PHP applications.",
            "homepage": "https://flareapp.io/ignition",
            "keywords": [
                "error",
                "flare",
                "laravel",
                "page"
            ],
            "support": {
                "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction",
                "forum": "https://twitter.com/flareappio",
                "issues": "https://github.com/spatie/ignition/issues",
                "source": "https://github.com/spatie/ignition"
            },
            "funding": [
                {
                    "url": "https://github.com/spatie",
                    "type": "github"
                }
            ],
            "time": "2024-01-03T15:49:39+00:00"
        },
        {
            "name": "spatie/laravel-ignition",
            "version": "2.4.1",
            "source": {
                "type": "git",
                "url": "https://github.com/spatie/laravel-ignition.git",
                "reference": "005e1e7b1232f3b22d7e7be3f602693efc7dba67"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/005e1e7b1232f3b22d7e7be3f602693efc7dba67",
                "reference": "005e1e7b1232f3b22d7e7be3f602693efc7dba67",
                "shasum": ""
            },
            "require": {
                "ext-curl": "*",
                "ext-json": "*",
                "ext-mbstring": "*",
                "illuminate/support": "^10.0|^11.0",
                "php": "^8.1",
                "spatie/flare-client-php": "^1.3.5",
                "spatie/ignition": "^1.9",
                "symfony/console": "^6.2.3|^7.0",
                "symfony/var-dumper": "^6.2.3|^7.0"
            },
            "require-dev": {
                "livewire/livewire": "^2.11|^3.3.5",
                "mockery/mockery": "^1.5.1",
                "openai-php/client": "^0.8.1",
                "orchestra/testbench": "^8.0|^9.0",
                "pestphp/pest": "^2.30",
                "phpstan/extension-installer": "^1.2",
                "phpstan/phpstan-deprecation-rules": "^1.1.1",
                "phpstan/phpstan-phpunit": "^1.3.3",
                "vlucas/phpdotenv": "^5.5"
            },
            "suggest": {
                "openai-php/client": "Require get solutions from OpenAI",
                "psr/simple-cache-implementation": "Needed to cache solutions from OpenAI"
            },
            "type": "library",
            "extra": {
                "laravel": {
                    "providers": [
                        "Spatie\\LaravelIgnition\\IgnitionServiceProvider"
                    ],
                    "aliases": {
                        "Flare": "Spatie\\LaravelIgnition\\Facades\\Flare"
                    }
                }
            },
            "autoload": {
                "files": [
                    "src/helpers.php"
                ],
                "psr-4": {
                    "Spatie\\LaravelIgnition\\": "src"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Spatie",
                    "email": "info@spatie.be",
                    "role": "Developer"
                }
            ],
            "description": "A beautiful error page for Laravel applications.",
            "homepage": "https://flareapp.io/ignition",
            "keywords": [
                "error",
                "flare",
                "laravel",
                "page"
            ],
            "support": {
                "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction",
                "forum": "https://twitter.com/flareappio",
                "issues": "https://github.com/spatie/laravel-ignition/issues",
                "source": "https://github.com/spatie/laravel-ignition"
            },
            "funding": [
                {
                    "url": "https://github.com/spatie",
                    "type": "github"
                }
            ],
            "time": "2024-01-12T13:14:58+00:00"
        },
        {
            "name": "theseer/tokenizer",
            "version": "1.2.2",
            "source": {
                "type": "git",
                "url": "https://github.com/theseer/tokenizer.git",
                "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
                "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
                "shasum": ""
            },
            "require": {
                "ext-dom": "*",
                "ext-tokenizer": "*",
                "ext-xmlwriter": "*",
                "php": "^7.2 || ^8.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",
            "support": {
                "issues": "https://github.com/theseer/tokenizer/issues",
                "source": "https://github.com/theseer/tokenizer/tree/1.2.2"
            },
            "funding": [
                {
                    "url": "https://github.com/theseer",
                    "type": "github"
                }
            ],
            "time": "2023-11-20T00:12:19+00:00"
        }
    ],
    "aliases": [],
    "minimum-stability": "stable",
    "stability-flags": {
        "laravel/unfenced": 20
    },
    "prefer-stable": true,
    "prefer-lowest": false,
    "platform": {
        "php": "^8.1"
    },
    "platform-dev": [],
    "plugin-api-version": "2.6.0"
}


<?php

/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <taylor@laravel.com>
 */

$uri = urldecode(
    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
);

// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
    return false;
}

require_once __DIR__.'/public/index.php';


#!/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);


<?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;


<?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();

        //
    }
}


<?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 = [
        \Torchlight\Middleware\RenderTorchlight::class,
        \App\Http\Middleware\TrustProxies::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,
            'cache.headers:public;max_age=300',
        ],

        '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,
    ];
}


<?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 = [
        //
    ];
}


<?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);
    }
}


<?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');
        }
    }
}


<?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 = [
        //
    ];
}


<?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 = [
        //
    ];
}


<?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;
}


#!/bin/bash

if [ ! -f composer.json ]; then
    echo "Please make sure to run this script from the root directory of this repo."
    exit 1
fi

composer install
cp .env.example .env
php artisan key:generate
source "$(dirname "$0")/checkout_latest_docs.sh"
npm install
npm run build


#!/bin/bash

if [ ! -f composer.json ]; then
    echo "Please make sure to run this script from the root directory of this repo."
    exit 1
fi

composer install
source "$(dirname "$0")/checkout_latest_docs.sh"
npm install
npm run build


<?php

use Illuminate\Support\Facades\Facade;

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' => Facade::defaultAliases()->merge([
        // 'Example' => App\Facades\Example::class,
    ])->toArray(),

];


<?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' => true,
            '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'),
        ],

    ],

];


<?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
    |--------------------------------------------------------------------------
    |
    | When using the "apc", "memcached", or "dynamodb" session drivers 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".
    |
    */

    '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',

];


<?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',
    ],

];


<?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' => ['daily'],
            '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'),
        ],
    ],

];


<?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'),
            'endpoint' => env('AWS_URL'),
        ],

    ],

    /*
    |--------------------------------------------------------------------------
    | 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'),
    ],

];


.docs_main {
    /* Headers */
    & h1, & h2, & h3, & h4, & h5, & h6, & h4 a, & h3 a, & h2 a {
        @apply dark:text-gray-200;
    }

    /* Body text */
    & p, & ul:not(:first-of-type) li, & .content-list ul li, & #software-list, & #valet-support {
        @apply dark:text-gray-400;
    }

    /* Table of contents */
    & h1 + ul li a {
        @apply dark:text-gray-300;
    }

    /* Links */
    & p a, & ul a, & ol a {
        @apply dark:text-red-600;
    }

    /* Tables */
    & table th {
        @apply dark:text-gray-200;
        @apply dark:border-gray-700;
    }

    & table td {
        @apply dark:text-gray-400;
        @apply dark:border-gray-700;
    }

    & table td.support-policy-highlight {
      @apply dark:text-black;
    }
}

.docs_sidebar {
    /* Sidebar links */
    & ul li h2, & ul li a {
        @apply dark:text-gray-400;
    }
}

/* Pound sign before headings */
.dark .docs_main {
    & h4 a:before, & h3 a:before, & h2 a:before {
        opacity: 1;
    }
}

/* Carbon ads */
#carbonads {
    @apply dark:bg-dark-600;

    & .carbon-text {
        @apply dark:text-gray-400;
    }

    & .carbon-poweredby {
        @apply dark:text-gray-500;
    }
}

/* Color mode buttons */
#header__sun, #header__moon, #header__indeterminate { display: none; }
html[color-theme="dark"] #header__moon { display: block; }
html[color-theme="light"] #header__sun { display: block; }
html[color-theme="system"] #header__indeterminate { display: block; }


@import 'tailwindcss/base';

@import 'tailwindcss/components';

@import "./_typography.css";
@import "./_code.css";
@import "./_sidebar_layout.css";
@import "./_search.css";
@import "./_docs.css";
@import "./_carbon_ads.css";
@import "./_accessibility.css";

@import 'tailwindcss/utilities';

@import "./_dark_mode.css";

[x-cloak] {
    display: none !important;
}

.bg-radial-gradient {
    background-image: radial-gradient(50% 50% at 50% 50%, #EB4432 0%, rgba(255, 255, 255, 0) 100%);
}

.partners_body a {
    color: theme('colors.red.600');
    text-decoration: underline;
}

.version-colors {
    @apply sm:flex dark:text-gray-400 mb-1;
}
.version-colors .color-box {
    @apply w-3 h-3 mr-2 ;
}
.version-colors div.end-of-life {
    @apply flex items-center mr-4;
}
.version-colors div.end-of-life div:first-child {
    @apply bg-red-500;
}
.version-colors div.security-fixes {
    @apply flex items-center;
}
.version-colors div.security-fixes div:first-child {
    @apply bg-orange-600;
}


<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Validation Language Lines
    |--------------------------------------------------------------------------
    |
    | The following language lines contain the default error messages used by
    | the validator class. Some of these rules have multiple versions such
    | as the size rules. Feel free to tweak each of these messages here.
    |
    */

    'accepted' => 'The :attribute must be accepted.',
    'active_url' => 'The :attribute is not a valid URL.',
    'after' => 'The :attribute must be a date after :date.',
    'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
    'alpha' => 'The :attribute may only contain letters.',
    'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
    'alpha_num' => 'The :attribute may only contain letters and numbers.',
    'array' => 'The :attribute must be an array.',
    'before' => 'The :attribute must be a date before :date.',
    'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
    'between' => [
        'numeric' => 'The :attribute must be between :min and :max.',
        'file' => 'The :attribute must be between :min and :max kilobytes.',
        'string' => 'The :attribute must be between :min and :max characters.',
        'array' => 'The :attribute must have between :min and :max items.',
    ],
    'boolean' => 'The :attribute field must be true or false.',
    'confirmed' => 'The :attribute confirmation does not match.',
    'date' => 'The :attribute is not a valid date.',
    'date_equals' => 'The :attribute must be a date equal to :date.',
    'date_format' => 'The :attribute does not match the format :format.',
    'different' => 'The :attribute and :other must be different.',
    'digits' => 'The :attribute must be :digits digits.',
    'digits_between' => 'The :attribute must be between :min and :max digits.',
    'dimensions' => 'The :attribute has invalid image dimensions.',
    'distinct' => 'The :attribute field has a duplicate value.',
    'email' => 'The :attribute must be a valid email address.',
    'exists' => 'The selected :attribute is invalid.',
    'file' => 'The :attribute must be a file.',
    'filled' => 'The :attribute field must have a value.',
    'gt' => [
        'numeric' => 'The :attribute must be greater than :value.',
        'file' => 'The :attribute must be greater than :value kilobytes.',
        'string' => 'The :attribute must be greater than :value characters.',
        'array' => 'The :attribute must have more than :value items.',
    ],
    'gte' => [
        'numeric' => 'The :attribute must be greater than or equal :value.',
        'file' => 'The :attribute must be greater than or equal :value kilobytes.',
        'string' => 'The :attribute must be greater than or equal :value characters.',
        'array' => 'The :attribute must have :value items or more.',
    ],
    'image' => 'The :attribute must be an image.',
    'in' => 'The selected :attribute is invalid.',
    'in_array' => 'The :attribute field does not exist in :other.',
    'integer' => 'The :attribute must be an integer.',
    'ip' => 'The :attribute must be a valid IP address.',
    'ipv4' => 'The :attribute must be a valid IPv4 address.',
    'ipv6' => 'The :attribute must be a valid IPv6 address.',
    'json' => 'The :attribute must be a valid JSON string.',
    'lt' => [
        'numeric' => 'The :attribute must be less than :value.',
        'file' => 'The :attribute must be less than :value kilobytes.',
        'string' => 'The :attribute must be less than :value characters.',
        'array' => 'The :attribute must have less than :value items.',
    ],
    'lte' => [
        'numeric' => 'The :attribute must be less than or equal :value.',
        'file' => 'The :attribute must be less than or equal :value kilobytes.',
        'string' => 'The :attribute must be less than or equal :value characters.',
        'array' => 'The :attribute must not have more than :value items.',
    ],
    'max' => [
        'numeric' => 'The :attribute may not be greater than :max.',
        'file' => 'The :attribute may not be greater than :max kilobytes.',
        'string' => 'The :attribute may not be greater than :max characters.',
        'array' => 'The :attribute may not have more than :max items.',
    ],
    'mimes' => 'The :attribute must be a file of type: :values.',
    'mimetypes' => 'The :attribute must be a file of type: :values.',
    'min' => [
        'numeric' => 'The :attribute must be at least :min.',
        'file' => 'The :attribute must be at least :min kilobytes.',
        'string' => 'The :attribute must be at least :min characters.',
        'array' => 'The :attribute must have at least :min items.',
    ],
    'not_in' => 'The selected :attribute is invalid.',
    'not_regex' => 'The :attribute format is invalid.',
    'numeric' => 'The :attribute must be a number.',
    'present' => 'The :attribute field must be present.',
    'regex' => 'The :attribute format is invalid.',
    'required' => 'The :attribute field is required.',
    'required_if' => 'The :attribute field is required when :other is :value.',
    'required_unless' => 'The :attribute field is required unless :other is in :values.',
    'required_with' => 'The :attribute field is required when :values is present.',
    'required_with_all' => 'The :attribute field is required when :values are present.',
    'required_without' => 'The :attribute field is required when :values is not present.',
    'required_without_all' => 'The :attribute field is required when none of :values are present.',
    'same' => 'The :attribute and :other must match.',
    'size' => [
        'numeric' => 'The :attribute must be :size.',
        'file' => 'The :attribute must be :size kilobytes.',
        'string' => 'The :attribute must be :size characters.',
        'array' => 'The :attribute must contain :size items.',
    ],
    'starts_with' => 'The :attribute must start with one of the following: :values',
    'string' => 'The :attribute must be a string.',
    'timezone' => 'The :attribute must be a valid zone.',
    'unique' => 'The :attribute has already been taken.',
    'uploaded' => 'The :attribute failed to upload.',
    'url' => 'The :attribute format is invalid.',
    'uuid' => 'The :attribute must be a valid UUID.',

    /*
    |--------------------------------------------------------------------------
    | Custom Validation Language Lines
    |--------------------------------------------------------------------------
    |
    | Here you may specify custom validation messages for attributes using the
    | convention "attribute.rule" to name the lines. This makes it quick to
    | specify a specific custom language line for a given attribute rule.
    |
    */

    'custom' => [
        'attribute-name' => [
            'rule-name' => 'custom-message',
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Custom Validation Attributes
    |--------------------------------------------------------------------------
    |
    | The following language lines are used to swap our attribute placeholder
    | with something more reader friendly such as "E-Mail Address" instead
    | of "email". This simply helps us make our message more expressive.
    |
    */

    'attributes' => [],

];


                            <button id="header__sun" onclick="toSystemMode()" title="Switch to system theme" class="relative w-10 h-10 focus:outline-none focus:shadow-outline text-gray-500">
                                <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-sun" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
                                    <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
                                    <circle cx="12" cy="12" r="4"></circle>
                                    <path d="M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7"></path>
                                 </svg>
                            </button>
                            <button id="header__moon" onclick="toLightMode()" title="Switch to light mode" class="relative w-10 h-10 focus:outline-none focus:shadow-outline text-gray-500">
                                <svg style="width:24px;height:24px" viewBox="0 0 24 24">
                                    <path fill="currentColor" d="M17.75,4.09L15.22,6.03L16.13,9.09L13.5,7.28L10.87,9.09L11.78,6.03L9.25,4.09L12.44,4L13.5,1L14.56,4L17.75,4.09M21.25,11L19.61,12.25L20.2,14.23L18.5,13.06L16.8,14.23L17.39,12.25L15.75,11L17.81,10.95L18.5,9L19.19,10.95L21.25,11M18.97,15.95C19.8,15.87 20.69,17.05 20.16,17.8C19.84,18.25 19.5,18.67 19.08,19.07C15.17,23 8.84,23 4.94,19.07C1.03,15.17 1.03,8.83 4.94,4.93C5.34,4.53 5.76,4.17 6.21,3.85C6.96,3.32 8.14,4.21 8.06,5.04C7.79,7.9 8.75,10.87 10.95,13.06C13.14,15.26 16.1,16.22 18.97,15.95M17.33,17.97C14.5,17.81 11.7,16.64 9.53,14.5C7.36,12.31 6.2,9.5 6.04,6.68C3.23,9.82 3.34,14.64 6.35,17.66C9.37,20.67 14.19,20.78 17.33,17.97Z" />
                                </svg>
                            </button>
                            <button id="header__indeterminate" onclick="toDarkMode()" title="Switch to dark mode" class="relative w-10 h-10 focus:outline-none focus:shadow-outline text-gray-500">
                                <svg style="width:24px;height:24px" viewBox="0 0 24 24">
                                    <path fill="currentColor" d="M12 2A10 10 0 0 0 2 12A10 10 0 0 0 12 22A10 10 0 0 0 22 12A10 10 0 0 0 12 2M12 4A8 8 0 0 1 20 12A8 8 0 0 1 12 20V4Z" />
                                </svg>
                            </button>
                            <button class="ml-2 relative w-10 h-10 p-2 text-red-600 lg:hidden focus:outline-none focus:shadow-outline" aria-label="Menu" @click.prevent="navIsOpen = !navIsOpen">
                                <svg x-show="! navIsOpen" x-transition.opacity class="absolute inset-0 mt-2 ml-2 w-6 h-6" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>
                                <svg x-show="navIsOpen" x-transition.opacity x-cloak class="absolute inset-0 mt-2 ml-2 w-6 h-6" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
                            </button>

                    <nav
                        x-show="navIsOpen"
                        x-cloak
                        class="absolute w-full transform origin-top shadow-sm z-10"
                        x-transition:enter="duration-150 ease-out"
                        x-transition:enter-start="opacity-0 -translate-y-8 scale-75"
                        x-transition:enter-end="opacity-100 scale-100"
                        x-transition:leave="duration-100 ease-in"
                        x-transition:leave-start="opacity-100 scale-100"
                        x-transition:leave-end="opacity-0 -translate-y-8 scale-75"
                    >

                            {!! $index !!}


{{ $slot }}


    <x-header-news-bar />

Forge

Vapor

                    <button class="flex items-center justify-center" @click="expanded = !expanded">
                        Ecosystem

                            <svg xmlns="http://www.w3.org/2000/svg" :class="{ 'rotate-180': expanded }" class="h-4 w-4 transition-transform" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /></svg>

                    </button>
                    <div
                        x-show="expanded"
                        x-cloak
                        class="absolute left-28 z-20 transition transform -translate-x-1/2"
                        x-transition:enter="duration-250 ease-out"
                        x-transition:enter-start="opacity-0 -translate-y-8"
                        x-transition:enter-end="opacity-100"
                        x-transition:leave="duration-250 ease-in"
                        x-transition:leave-start="opacity-100"
                        x-transition:leave-end="opacity-0 -translate-y-8"
                    >

                                @foreach (App\Ecosystem::items() as $ecosystemItemId => $ecosystemItem)

{{ $ecosystemItem['name'] }}

                                                {{ $ecosystemItem['description'] }}

                                @endforeach

News

Partners

Careers

                {{--
Shop
 --}}

                <button id="docsearch"></button>
                <x-button.secondary href="/docs/{{ DEFAULT_VERSION }}" class="hidden lg:ml-4 lg:inline-flex">Documentation</x-button.secondary>
                <button
                    class="ml-2 relative w-10 h-10 inline-flex items-center justify-center p-2 text-gray-700 lg:hidden"
                    aria-label="Toggle Menu"
                    @click.prevent="navIsOpen = !navIsOpen"
                >
                    <svg x-show="! navIsOpen" class="w-6" viewBox="0 0 28 12" fill="none" xmlns="http://www.w3.org/2000/svg"><line y1="1" x2="28" y2="1" stroke="currentColor" stroke-width="2"/><line y1="11" x2="28" y2="11" stroke="currentColor" stroke-width="2"/></svg>
                    <svg x-show="navIsOpen" x-cloak class="absolute inset-0 mt-2.5 ml-2.5 w-5" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg"><rect y="1.41406" width="2" height="24" transform="rotate(-45 0 1.41406)" fill="currentColor"/><rect width="2" height="24" transform="matrix(0.707107 0.707107 0.707107 -0.707107 0.192383 16.9707)" fill="currentColor"/></svg>
                </button>

Forge

Vapor

News

Partners

Careers

                    {{--
Shop
 --}}

<x-button.secondary class="mt-3 w-full max-w-md" href="/docs/{{ DEFAULT_VERSION }}">Documentation</x-button.secondary>


<x-tabs>
    <x-tabs.tab name="authentication" title="Authentication" icon="lock-closed">

Authenticating users is as simple as adding an authentication middleware to your Laravel route definition:

<x-torchlight-code language="php">
            Route::get('/profile', ProfileController::class)
                ->middleware('auth');
        </x-torchlight-code>

Once the user is authenticated, you can access the authenticated user via the Auth facade:

<x-torchlight-code language="php">
            use Illuminate\Support\Facades\Auth;

            // Get the currently authenticated user...
            $user = Auth::user();
        </x-torchlight-code>

Of course, you may define your own authentication middleware, allowing you to customize the authentication process.

For more information on Laravel's authentication features, check out the authentication documentation.

    </x-tabs.tab>

    <x-tabs.tab name="authorization" title="Authorization" icon="identification">

You'll often need to check whether an authenticated user is authorized to perform a specific action. Laravel's model policies make it a breeze:

<x-torchlight-code language="bash">
            php artisan make:policy UserPolicy
        </x-torchlight-code>

Once you've defined your authorization rules in the generated policy class, you can authorize the user's request in your controller methods:

<x-torchlight-code language="php">
            public function update(Request $request, Invoice $invoice)
            {
                Gate::authorize('update', $invoice);// [tl! focus]

                $invoice->update(/* ... */);
            }
        </x-torchlight-code>

Learn more

    </x-tabs.tab>

    <x-tabs.tab name="eloquent" title="Eloquent ORM" icon="table-cells">

Scared of databases? Don't be. Laravel’s Eloquent ORM makes it painless to interact with your application's data, and models, migrations, and relationships can be quickly scaffolded:

<x-torchlight-code language="text">
            php artisan make:model Invoice --migration
        </x-torchlight-code>

Once you've defined your model structure and relationships, you can interact with your database using Eloquent's powerful, expressive syntax:

<x-torchlight-code language="php">
            // Create a related model...
            $user->invoices()->create(['amount' => 100]);

            // Update a model...
            $invoice->update(['amount' => 200]);

            // Retrieve models...
            $invoices = Invoice::unpaid()->where('amount', '>=', 100)->get();

            // Rich API for model interactions...
            $invoices->each->pay();
        </x-torchlight-code>

Learn more

    </x-tabs.tab>

    <x-tabs.tab name="migrations" title="Database Migrations" icon="circle-stack">

Migrations are like version control for your database, allowing your team to define and share your application's database schema definition:

<x-torchlight-code language="php">
            public function up(): void
            {
                Schema::create('flights', function (Blueprint $table) {
                    $table->uuid()->primary();
                    $table->foreignUuid('airline_id')->constrained();
                    $table->string('name');
                    $table->timestamps();
                });
            }
        </x-torchlight-code>

Learn more

    </x-tabs.tab>

    <x-tabs.tab name="validation" title="Validation" icon="check-badge">

Laravel has over 90 powerful, built-in validation rules and, using Laravel Precognition, can provide live validation on your frontend:

<x-torchlight-code language="php">
            public function update(Request $request)
            {
                $validated = $request->validate([// [tl! focus:start]
                    'email' => 'required|email|unique:users',
                    'password' => Password::required()->min(8)->uncompromised(),
                ]);// [tl! focus:end]

                $request->user()->update($validated);
            }
        </x-torchlight-code>

Learn more

    </x-tabs.tab>

    <x-tabs.tab name="notifications" title="Notifications & Mail" icon="bell-alert">

Use Laravel to quickly send beautifully styled notifications to your users via email, Slack, SMS, in-app, and more:

<x-torchlight-code language="bash">
            php artisan make:notification InvoicePaid
        </x-torchlight-code>

Once you have generated a notification, you can easily send the message to one of your application's users:

<x-torchlight-code language="php">
            $user->notify(new InvoicePaid($invoice));
        </x-torchlight-code>

Learn more

    </x-tabs.tab>

    <x-tabs.tab name="storage" title="File Storage" icon="archive-box">

Laravel provides a robust filesystem abstraction layer, providing a single, unified API for interacting with local filesystems and cloud based filesystems like Amazon S3:

<x-torchlight-code language="php">
            $path = $request->file('avatar')->store('s3');
        </x-torchlight-code>

Regardless of where your files are stored, interact with them using Laravel's simple, elegant syntax:

<x-torchlight-code language="php">
            $content = Storage::get('photo.jpg');

            Storage::put('photo.jpg', $content);
        </x-torchlight-code>

Learn more

    </x-tabs.tab>

    <x-tabs.tab name="queues" title="Job Queues" icon="queue-list">

Laravel lets you to offload slow jobs to a background queue, keeping your web requests snappy:

<x-torchlight-code language="php">
            $podcast = Podcast::create(/* ... */);

            ProcessPodcast::dispatch($podcast)->onQueue('podcasts');// [tl! focus]
        </x-torchlight-code>

You can run as many queue workers as you need to handle your workload:

<x-torchlight-code language="bash">
            php artisan queue:work redis --queue=podcasts
        </x-torchlight-code>

For more visibility and control over your queues, Laravel Horizon provides a beautiful dashboard and code-driven configuration for your Laravel-powered Redis queues.

Learn more

Job Queues

Laravel Horizon

    </x-tabs.tab>

    <x-tabs.tab name="scheduling" title="Task Scheduling" icon="clock">

Schedule recurring jobs and commands with an expressive syntax and say goodbye to complicated configuration files:

<x-torchlight-code language="php">
            $schedule->job(NotifySubscribers::class)->hourly();
        </x-torchlight-code>

Laravel's scheduler can even handle multiple servers and offers built-in overlap prevention:

<x-torchlight-code language="php">
            $schedule->job(NotifySubscribers::class)
                ->dailyAt('9:00')
                ->onOneServer()
                ->withoutOverlapping();
        </x-torchlight-code>

Learn more

    </x-tabs.tab>

    <x-tabs.tab name="testing" title="Testing" icon="command-line">

Laravel is built for testing. From unit tests to browser tests, you’ll feel more confident in deploying your application:

<x-torchlight-code language="php">
            $user = User::factory()->create();

            $this->browse(fn (Browser $browser) => $browser
                ->visit('/login')
                ->type('email', $user->email)
                ->type('password', 'password')
                ->press('Login')
                ->assertPathIs('/home')
                ->assertSee("Welcome {$user->name}")
            );
        </x-torchlight-code>


<?php

/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <taylor@laravel.com>
 */

define('LARAVEL_START', microtime(true));

if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
    require __DIR__.'/../storage/framework/maintenance.php';
}

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
|
*/

require __DIR__.'/../vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/../bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);


<?php

use Illuminate\Foundation\Inspiring;

/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based console
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
|
*/

Artisan::command('inspire', function () {
    $this->comment(Inspiring::quote());
})->describe('Display an inspiring quote');


to any links on a page where the user's email address is
  known, you may propagate it to the next page. The PHP logging
  system will automatically look for this variable and record its
  value as the user's e-mail address in the logs. For any users of
  PHP1, the above serves the same function as adding
  ?<!--$email--> to the URL used to do in PHP1. It
  looks a little bit more complex now, but it is also completely
  general allowing you to build your own complex pages.

In the above example you can also see how multiple variables
  can be defined right in the GET method data by separating each
  with the "&" character. This "&" separated list of
  variables must be the last (or only) component of the GET method
  data for it to be valid.

SELECT MULTIPLE
  and PHP

The SELECT MULTIPLE tag in an HTML construct allows users to
  select multiple items from a list. These items are then passed to
  the action handler for the form. The problem is that they are all
  passed with the same widget name. ie.

    <SELECT NAME="var" MULTIPLE>

Each selected option will arrive at the action handler as:

var=option1

  var=option2

  var=option3

Each option will overwrite the contents of the previous $var
  variable. The solution is to use PHP/FI's non-indexed array
  feature. The following should be used:

    <SELECT NAME="var[]" MULTIPLE>

This tells PHP/FI to treat var as an array an each
  assignment of a value to var[] adds an item to the array. The
  first item becomes $var[0], the next $var[1], etc. The count() function can be used to determine how many
  options were selected, and the sort()
  function can be used to sort the option array if necessary.

  IMAGE
  SUBMIT and PHP

When submitting a form, it is possible to use an image instead
  of the standard submit button with a tag like:

    <input type=image src=image.gif name=sub>

When the user clicks somewhere on the image, the accompanying
  form will be transmitted to the server with two additional
  variables, sub_x and sub_y. These contain the
  coordinates of the user click within the image. The experienced
  may note that the actual variable names sent by the browser
  contains a period rather than an underscore, but PHP converts the
  period to an underscore automatically.

GD (a graphics library
  for GIF creation) Support in PHP
PHP supports the GD
  library version 1.2 written by Thomas Boutell. There is no GD
  code in PHP itself. If you wish to use the GD support in PHP/FI,
  you must obtain the GD library from http://www.boutell.com/gd/http/gd1.3.tar.gz,
  install it, and then re-install PHP.

Not all of the GD features are supported by PHP. For a list of
  supported functions see the Alphabetical List of
  Functions. All the GD functions start with the word,
  Image.

More information on the GD package is available at: http://www.boutell.com/gd/.

GD 1.2 is copyright 1994, 1995 Quest Protein Database
  Center, Cold Springs Harbor Labs.

PHP/FI and Virtual
  Hosts
PHP works fine on virtual host setups supported by
  some http daemons. The one problem that may occur on such a setup
  is related to an inconsistency in the way httpd sets the
  SCRIPT_NAME environment variable. Normally it is set to the path
  of the current CGI program in relation to the top-level ROOT_DIR
  on the httpd server. However, when a virtual domain is used, some
  httpd's do not correctly set the SCRIPT_NAME variable as the
  relative path from the virtual domain's top level directory as it
  should. If the ?config screen gives you an invalid URL error
  message, you know that this problem exists on your setup. You
  will need to edit the php.h file and set the
  VIRTUAL_PATH #define to the path to your php.cgi binary
  relative to your top-level directory.

File Upload Support

PHP/FI will automatically detect a file upload from a browser
  which supports the form-based file upload features as proposed by
  E. Nebel and
  L. Masinter from
  Xerox and described in RFC 1867.

A file upload screen can be built by creating a special form
  which looks something like this:

    <FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST>

    <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">

    Send this file: <INPUT NAME="userfile" TYPE="file">

    <INPUT TYPE="submit" VALUE="Send File">

    </FORM>

The _URL_ should point to a php html file. The MAX_FILE_SIZE
  hidden field must precede the file input field and its value is
  the maximum filesize accepted. The value is in bytes. In this
  destination file, the following variables will be defined upon a
  successful upload:

$userfile

The temporary filename in which the uploaded file was
      stored on the server machine.

$userfile_name

The original name of the file on the sender's system.

$userfile_size

The size of the uploaded file in bytes.

$userfile_type

The mime type of the file if the browser provided this
      information. An example would be "image/gif".

The $userfile basename of the above
  variables will match the NAME field in the upload form.

Files will by default be stored in the server's default
  temporary directory. This can be changed by setting the
  environment variable TMPDIR in the environment in which PHP/FI
  runs. Setting it using a PutEnv() call from within a PHP/FI
  script will not work though. Alternatively, you may hard-code in
  a temporary directory by editing php.h and defining the
  UPLOAD_TMPDIR variable.

The PHP/FI script which receives the uploaded file should
  implement whatever logic is necessary for determining what should
  be done with the uploaded file. You can for example use the
  $file_size variable to throw away any files that are either too
  small or too big. You could use the $file_type variable to throw
  away any files that didn't match a certain type criteria.
  Whatever the logic, you should either delete the file from the
  temporary directory or move it elsewhere.


Also inherent to the language is the fact that the type of the
  variable determines how certain basic operations will be carried
  out. For example:

    $a = $b + $c;

can do a couple of different things. If $b is a number, the
  numerical value of $c is added to $b and the sum is stored in $a.
  In this case the type of $c is irrelevant. The operation is
  guided by the type of the first variable. If $b is a string, then
  the string value of $c is appended to $b and the resultant string
  is placed in $a. This also leads to some caveats. You should read
  the section on overloaded operators to
  get a better understanding of how to deal with them.

Associative Arrays

The previous section introduced associative arrays. An
  associative array is an array in which the index need not be a
  numerically sequential value. The array index can be any number
  or string. PHP/FI provides a set of functions to manipulate these
  associative arrays. These include, Next(),
  Prev(),Reset(),End(), and Key().

Variable Variables

Sometimes it is convenient to be able to have variable
  variable names. That is, a variable name which can be set and
  used dynamically. A normal variable is set with a statement such
  as:

    $a = "hello";

A variable variable takes the value of a variable and treats
  that as the name of a variable. In the above example,
  hello, can be used as the name of a variable by
  using two dollar signs. ie.

    $$a = "world";

At this point two variables have been defined and stored in
  the PHP/FI symbol tree:

    Variable Name        Variable Content
         a                   hello
         hello               world

Therefore, this statement:

    echo "$a $$a";

produces the exact same output as:

    echo "$a $hello";

ie. they both produce: hello world

Language Constructs

As far as language constructs are concerned, the PHP language
  is quite simple. The following commands are used to guide the
  control flow through a file:

if (condition)

else

elseif (condition)

endif

switch(expression)

case expression

default

break

endswitch

while

endwhile

include

exit

The syntax of conditions are similar to that of the C
  language. == tests for equality.
  != means not equal. Also supported are:
  >, <,
  >=, <=. Conditional AND
  is &&, conditional OR is
  ||.

Examples:

    <?
      if($a==5 &&  $b!=0 );
        $c = 100 + $a / $b;
      endif;
    >

The above may also be written in standard C syntax:

  In this case, there is no need for a semicolon after the closing
  curly brace.

    <?
      if($a==5 && $b!=0) {
          $c = 100 + $a / $b;
      }
    >

There is no difference between the two syntaxes. I personally
  like to use endif, endswitch and endwhile so I explicitly know
  which construct I am ending. However, these ending constructs can
  always be replaced with a closing curly brace.

It is important to note that the flow of the language is not
  dependent on the organization of the script blocks within the
  code. You can start an if expression in one block and have the
  end of the expression in another. For example:

   <?if($a==5 &&  $b!=0)>
                  <b>Normal html text</b>
        <?endif>

In this example it is easy to see why it is sometimes more
  desirable to use the endif keyword as opposed to a
  closing brace. The above is much more readable than the
  following:

   <?if($a==5 &&  $b!=0) {>
                  <b>Normal html text</b>
        <? } >

Both version are valid and they will do exactly the same
  thing.

User-Defined
  Functions

You may define a function within a PHP script with the
  following syntax:

    <?
      Function Test (
        echo "This is a test\n";
      );
    >

This function can now be called from anywhere in the script as
  long as the call comes after the function definition. A sample
  call might be:

    <?
      Test();
    >

User defined functions like this act exactly like PHP's
  internal functions in that you can pass arguments to them and
  have them return a value. Here is the syntax for a function
  definition of a function which takes 3 arguments and returns the
  sum of these arguments:

    <?
      Function Sum $a,$b,$c (
        return($a+$b+$c);
      );

      echo Sum($a,$b,$c);
    >

The return statement is used to return a value from
  the function. Only a single value can be returned using this
  mechanism, however, if more values need to be communicated back
  and forth between the main code and functions, global variables
  can be used. This brings us to the section on the scope of
  variables.

Scope of Variables

The scope of a variable is the context within which it is
  defined. For the most part all PHP/FI variables only have a
  single scope. However, within user-defined functions a local
  function scope is introduced. Any variable used inside a function
  is by default limited to the local function scope. For
  example:

    $a=1; /* global scope */
    Function Test (
      echo $a; /* reference to local scope variable */
    );
    Test();

This script will not produce any output because the
  echo statement refers to a local version of the
  $a variable, and it has not been assigned a value within
  this scope. You may notice that this is a little bit different
  from the C language in that global variables in C are
  automatically available to functions unless specifically
  overridden by a local definition. This can cause some problems in
  that people may inadvertently change a global variable. In PHP/FI
  global variables must be declared global inside a function if
  they are going to be used in that function. An example:

    $a=1;
    $b=2;
    Function Sum $first,$second (
      global $a,$b;