mgsmus public function profile($username)
{
$user = User::where('name', $username)->firstOrFail();
return view('layouts.profile.profile')->with([
'site_name' => Settings::find('site_name')->value,
'site_description' => Settings::find('site_description')->value,
'page_name' => $user->name,
'categories' => $this->categories,
'pages' => $this->pages,
'status_write' => Settings::find('active_upload')->value,
'setting_adv_top' => Settings::find('adv_top')->value,
'setting_adv_bottom' => Settings::find('adv_bottom')->value,
'adv_top' => Advertising::where('id', Settings::find('adv_top')->value)->first(),
'adv_bottom' => Advertising::where('id', Settings::find('adv_bottom')->value)->first(),
'user' => $user,
'topBadge' => Badges::find(Settings::find('top_badge')->value),
'topUser' => $this->topUser,
'badgeList' => Badges::orderBy('score', 'asc')->get(),
'statusPoints' => Settings::find('status_points')->value
]);
}