mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Add useful links support to sidebar
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\View\Composers;
|
||||
|
||||
use App\Events\UserLoggedIn;
|
||||
use App\Models\Category;
|
||||
use App\Models\Content;
|
||||
use App\Models\Settings;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -34,6 +35,13 @@ class GlobalDataComposer
|
||||
$viewData['site'] = $siteArray; // Now it's a proper array, not a Settings model
|
||||
}
|
||||
|
||||
// Load useful links for sidebar
|
||||
$usefulLinks = Content::active()
|
||||
->ofType(Content::TYPE_USEFUL)
|
||||
->orderBy('ordinal')
|
||||
->get();
|
||||
$viewData['usefulLinks'] = $usefulLinks;
|
||||
|
||||
if (Auth::check()) {
|
||||
$userdata = User::find(Auth::id());
|
||||
$userdata->categoryexclusions = User::getCategoryExclusionById(Auth::id());
|
||||
|
||||
Reference in New Issue
Block a user