Updated servers public page

Updated servers public page to show if logged in
This commit is contained in:
cp6 2022-02-20 22:43:38 +11:00
parent 3ab9f65da5
commit 6a00748563

View File

@ -9,6 +9,7 @@ use App\Models\Server;
use App\Models\Providers;
use App\Models\Locations;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Str;
@ -38,9 +39,8 @@ class ServerController extends Controller
Session::put('timer_version_footer', $settings[0]->show_versions_footer);
Session::put('show_servers_public', $settings[0]->show_servers_public);
Session::save();
// dd(Session::all());
if (Session::has('show_servers_public') && Session::get('show_servers_public') === 1) {
if ((Session::has('show_servers_public') && Session::get('show_servers_public') === 1) || Auth::check()) {
$servers = DB::table('servers as s')
->Join('pricings as pr', 's.id', '=', 'pr.service_id')
->Join('providers as p', 's.provider_id', '=', 'p.id')