From: Vincent Vanwaelscappel Date: Thu, 27 Feb 2020 18:17:43 +0000 (+0100) Subject: wip #3439 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7938b04d4acc3d044f473f34aa999b5ddf77c53f;p=QuizFactory.git wip #3439 --- diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index deb65e8..8a7d3a9 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -19,6 +19,9 @@ class Kernel extends HttpKernel \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, + \Cubist\Backpack\app\Middleware\VariantSelector::class, + \Spatie\MissingPageRedirector\RedirectsMissingPages::class, + \Spatie\Honeypot\ProtectAgainstSpam::class, ]; /** @@ -31,10 +34,15 @@ class Kernel extends HttpKernel \App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, - // \Illuminate\Session\Middleware\AuthenticateSession::class, + \Backpack\Base\app\Http\Middleware\UseBackpackAuthGuardInsteadOfDefaultAuthGuard::class, + \Illuminate\Session\Middleware\AuthenticateSession::class, + \Cubist\Backpack\app\Middleware\VariantSelector::class, + \Cubist\Backpack\app\Middleware\LocaleSelector::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, + \Cubist\Backpack\app\Middleware\EmailObfuscate::class, + \App\Http\Middleware\Menu::class, ], 'api' => [ @@ -76,6 +84,8 @@ class Kernel extends HttpKernel \App\Http\Middleware\Authenticate::class, \Illuminate\Routing\Middleware\ThrottleRequests::class, \Illuminate\Session\Middleware\AuthenticateSession::class, + \Cubist\Backpack\app\Middleware\VariantSelector::class, + \Cubist\Backpack\app\Middleware\LocaleSelector::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, \Illuminate\Auth\Middleware\Authorize::class, ]; diff --git a/app/Models/Locale.php b/app/Models/Locale.php new file mode 100644 index 0000000..fd75ee0 --- /dev/null +++ b/app/Models/Locale.php @@ -0,0 +1,8 @@ +=7.2.0", "predis/predis": "^1.1", "spatie/laravel-honeypot": "^1.4", "spatie/laravel-translatable": "^4.2", + "swayok/alternative-laravel-cache": "^5.4", "venturecraft/revisionable": "^1.33" }, "require-dev": { @@ -609,7 +997,7 @@ } ], "description": "Cubist Backpack extension", - "time": "2020-02-27T15:33:23+00:00" + "time": "2020-02-27T17:59:22+00:00" }, { "name": "cubist/cms-front", @@ -2439,71 +2827,6 @@ ], "time": "2020-01-14T01:53:02+00:00" }, - { - "name": "league/commonmark-ext-table", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/commonmark-ext-table.git", - "reference": "3228888ea69636e855efcf6636ff8e6316933fe7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark-ext-table/zipball/3228888ea69636e855efcf6636ff8e6316933fe7", - "reference": "3228888ea69636e855efcf6636ff8e6316933fe7", - "shasum": "" - }, - "require": { - "league/commonmark": "~0.19.3|^1.0", - "php": "^7.1" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "phpstan/phpstan": "~0.11", - "phpunit/phpunit": "^7.0|^8.0", - "symfony/var-dumper": "^4.0", - "vimeo/psalm": "^3.0" - }, - "type": "commonmark-extension", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-4": { - "League\\CommonMark\\Ext\\Table\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Martin Hasoň", - "email": "martin.hason@gmail.com" - }, - { - "name": "Webuni s.r.o.", - "homepage": "https://www.webuni.cz" - }, - { - "name": "Colin O'Dell", - "email": "colinodell@gmail.com", - "homepage": "https://www.colinodell.com" - } - ], - "description": "Table extension for league/commonmark", - "homepage": "https://github.com/thephpleague/commonmark-ext-table", - "keywords": [ - "commonmark", - "extension", - "markdown", - "table" - ], - "time": "2019-09-26T13:28:33+00:00" - }, { "name": "league/csv", "version": "9.5.0", @@ -3489,6 +3812,52 @@ ], "time": "2019-09-04T04:10:03+00:00" }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, { "name": "psr/container", "version": "1.0.0", @@ -4982,6 +5351,60 @@ ], "time": "2020-02-23T13:13:32+00:00" }, + { + "name": "swayok/alternative-laravel-cache", + "version": "5.4.10", + "source": { + "type": "git", + "url": "https://github.com/swayok/alternative-laravel-cache.git", + "reference": "b2597d23c4ea95e49cea19968fc4dc5e80bc5848" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swayok/alternative-laravel-cache/zipball/b2597d23c4ea95e49cea19968fc4dc5e80bc5848", + "reference": "b2597d23c4ea95e49cea19968fc4dc5e80bc5848", + "shasum": "" + }, + "require": { + "cache/filesystem-adapter": "^1.0.0", + "cache/predis-adapter": "^1.0.0", + "cache/redis-adapter": "^1.0.0", + "laravel/framework": ">=5.4|>=6.0", + "php": ">=5.6" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "AlternativeLaravelCache\\Provider\\AlternativeCacheStoresServiceProvider" + ] + } + }, + "autoload": { + "psr-0": { + "AlternativeLaravelCache": "/src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alexander Filippov" + } + ], + "description": "Replacements for Laravel's redis and file cache stores that properly implement tagging idea. Powered by cache pool implementations provided by http://www.php-cache.com/", + "keywords": [ + "cache", + "laravel", + "php", + "redis cache", + "redis tagged cache", + "tagged cache" + ], + "time": "2019-10-19T11:42:37+00:00" + }, { "name": "swiftmailer/swiftmailer", "version": "v6.2.3", diff --git a/config/backpack/base.php b/config/backpack/base.php index 4c26d17..9a4b67d 100644 --- a/config/backpack/base.php +++ b/config/backpack/base.php @@ -11,6 +11,7 @@ return [ | */ + // Date & Datetime Format Syntax: https://carbon.nesbot.com/docs/#api-localization 'default_date_format' => 'D MMM YYYY', 'default_datetime_format' => 'D MMM YYYY, HH:mm', diff --git a/public/.htaccess b/public/.htaccess index b75525b..58d518e 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -5,6 +5,10 @@ RewriteEngine On + # Redirect to https if accessing from http + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]