Move User model to Models/
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Closure;
|
||||
use Config;
|
||||
use View;
|
||||
|
||||
use App\Models\Site;
|
||||
|
||||
@@ -30,15 +30,11 @@ class SetSite
|
||||
$so = new Site;
|
||||
|
||||
if ($so->getTable() AND Schema::hasTable($so->getTable()))
|
||||
{
|
||||
$so = Site::where('url',$request->root())
|
||||
->first();
|
||||
}
|
||||
$so = Site::where('url',$request->root())->first();
|
||||
|
||||
// If we dont exist, we'll return a fake model.
|
||||
if (! $so or ! $so->exists) {
|
||||
if ((! $so) || (! $so->exists))
|
||||
$so = (new Site)->sample();
|
||||
}
|
||||
|
||||
// Set who we are in SETUP.
|
||||
Config::set('SITE_SETUP',$so);
|
||||
|
Reference in New Issue
Block a user