Initial refactoring work
This commit is contained in:
@@ -27,7 +27,7 @@ class SetSite
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
// @todo Figure out how to know if this is an API call - and deny it if it's not in the database.
|
||||
$so = NULL;
|
||||
$so = new Site;
|
||||
|
||||
if (Schema::hasTable('site'))
|
||||
{
|
||||
@@ -38,7 +38,7 @@ class SetSite
|
||||
}
|
||||
|
||||
// If we dont exist, we'll return a fake model.
|
||||
if (! $so) {
|
||||
if (! $so or ! $so->exists) {
|
||||
$so = (new Site)->sample();
|
||||
}
|
||||
|
||||
@@ -50,4 +50,4 @@ class SetSite
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user