Upload beautify
This commit is contained in:
@@ -35,7 +35,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
// Provide toolbar counts and user info to layout views (port of legacy toolbar logic)
|
||||
View::composer(['layouts.nova', 'layouts.nova.*'], function ($view) {
|
||||
$uploadCount = $favCount = $msgCount = $noticeCount = 0;
|
||||
$avatar = null;
|
||||
$avatarHash = null;
|
||||
$displayName = null;
|
||||
$userId = null;
|
||||
|
||||
@@ -72,15 +72,15 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
try {
|
||||
$profile = DB::table('user_profiles')->where('user_id', $userId)->first();
|
||||
$avatar = $profile->avatar ?? null;
|
||||
$avatarHash = $profile->avatar_hash ?? null;
|
||||
} catch (\Throwable $e) {
|
||||
$avatar = null;
|
||||
$avatarHash = null;
|
||||
}
|
||||
|
||||
$displayName = Auth::user()->name ?: (Auth::user()->username ?? '');
|
||||
}
|
||||
|
||||
$view->with(compact('userId','uploadCount', 'favCount', 'msgCount', 'noticeCount', 'avatar', 'displayName'));
|
||||
$view->with(compact('userId','uploadCount', 'favCount', 'msgCount', 'noticeCount', 'avatarHash', 'displayName'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user