Tell view whether we’re in Sandstorm.IO mode.

This commit is contained in:
James Cole
2017-02-05 08:27:23 +01:00
parent 3e510bd3f6
commit 959a1a08f0
3 changed files with 10 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ use Auth;
use Closure;
use FireflyIII\User;
use Illuminate\Http\Request;
use View;
/**
* Class Sandstorm
@@ -37,6 +38,7 @@ class Sandstorm
{
// is in Sandstorm environment?
$sandstorm = intval(getenv('SANDSTORM')) === 1;
View::share('SANDSTORM', $sandstorm);
if (!$sandstorm) {
return $next($request);
}
@@ -55,6 +57,7 @@ class Sandstorm
'password' => str_random(16),
]
);
}