Add check to see that we're installed, and remove the .env that's created
This commit is contained in:
parent
2dd259802d
commit
5bc8dab6f8
14
.env.bak
14
.env.bak
@ -1,14 +0,0 @@
|
|||||||
APP_ENV=dev
|
|
||||||
APP_KEY=base64:ve66Z5Kt/zTN3p++0zOPu854PHfZkwJE5VuoFAlzHtI=
|
|
||||||
APP_DEBUG=true
|
|
||||||
APP_LOCALE=en
|
|
||||||
APP_URL=http://localhost
|
|
||||||
|
|
||||||
APP_LOG=daily
|
|
||||||
APP_LOG_LEVEL=debug
|
|
||||||
APP_LOG_MAX_FILES=7
|
|
||||||
|
|
||||||
DB_CONNECTION=sqlite
|
|
||||||
|
|
||||||
CACHE_DRIVER=array
|
|
||||||
CACHE_PREFIX=
|
|
@ -30,6 +30,7 @@
|
|||||||
<inspection_tool class="PhpExpressionResultUnusedInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="PhpExpressionResultUnusedInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="PhpIncludeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="PhpIncludeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="PhpSignatureMismatchDuringInheritanceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="PhpSignatureMismatchDuringInheritanceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="PhpUnnecessaryFullyQualifiedNameInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="SecurityAdvisoriesInspection" enabled="false" level="WARNING" enabled_by_default="false">
|
<inspection_tool class="SecurityAdvisoriesInspection" enabled="false" level="WARNING" enabled_by_default="false">
|
||||||
<option name="optionConfiguration">
|
<option name="optionConfiguration">
|
||||||
<list>
|
<list>
|
||||||
|
@ -19,7 +19,6 @@ if [ "$TRAVIS" = "true" ]; then
|
|||||||
rm -rf .idea phpvms.iml .travis .dpl
|
rm -rf .idea phpvms.iml .travis .dpl
|
||||||
rm -rf .phpstorm.meta.php _ide_helper.php
|
rm -rf .phpstorm.meta.php _ide_helper.php
|
||||||
php artisan version:show --format compact --suppress-app-name > VERSION
|
php artisan version:show --format compact --suppress-app-name > VERSION
|
||||||
mv .env.dev.example .env
|
|
||||||
|
|
||||||
echo "creating tarball"
|
echo "creating tarball"
|
||||||
cd /tmp
|
cd /tmp
|
||||||
|
@ -25,6 +25,7 @@ class Kernel extends HttpKernel
|
|||||||
*/
|
*/
|
||||||
protected $middlewareGroups = [
|
protected $middlewareGroups = [
|
||||||
'web' => [
|
'web' => [
|
||||||
|
\App\Http\Middleware\InstalledCheck::class,
|
||||||
\App\Http\Middleware\EncryptCookies::class,
|
\App\Http\Middleware\EncryptCookies::class,
|
||||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||||
\Illuminate\Session\Middleware\StartSession::class,
|
\Illuminate\Session\Middleware\StartSession::class,
|
||||||
|
24
app/Http/Middleware/InstalledCheck.php
Normal file
24
app/Http/Middleware/InstalledCheck.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Handle the authentication for the API layer
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
|
||||||
|
class InstalledCheck
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Check the app.key to see whether we're installed or not
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
if (config('app.key') === 'NOT_INSTALLED') {
|
||||||
|
return view('system.errors.not_installed');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
@ -12,7 +12,7 @@ return [
|
|||||||
'locale' => env('APP_LOCALE', 'en'),
|
'locale' => env('APP_LOCALE', 'en'),
|
||||||
'fallback_locale' => 'en',
|
'fallback_locale' => 'en',
|
||||||
|
|
||||||
'key' => env('APP_KEY'),
|
'key' => env('APP_KEY', 'NOT_INSTALLED'),
|
||||||
'cipher' => 'AES-256-CBC',
|
'cipher' => 'AES-256-CBC',
|
||||||
|
|
||||||
'log' => env('APP_LOG', 'daily'),
|
'log' => env('APP_LOG', 'daily'),
|
||||||
|
Loading…
Reference in New Issue
Block a user