Skip to content

Commit 7dce109

Browse files
committed
Update UserController.php
1 parent 8e8d72f commit 7dce109

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

app/Http/Controllers/UserController.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,17 @@ public function littlelink(request $request)
9393
//Show littlelink page as home page if set in config
9494
public function littlelinkhome(request $request)
9595
{
96-
9796
$littlelink_name = env('HOME_URL');
9897
$id = User::select('id')->where('littlelink_name', $littlelink_name)->value('id');
9998

10099
if (empty($id)) {
101100
return abort(404);
102101
}
103-
104-
$userinfo = User::select('name', 'littlelink_name', 'littlelink_description', 'image', 'theme')->where('id', $id)->first();
105-
$information = User::select('name', 'littlelink_name', 'littlelink_description', 'image', 'theme')->where('id', $id)->get();
106-
107-
$links = DB::table('links')
108-
->where('user_id', $id)
109-
->orderBy('up_link', 'asc')->orderBy('order', 'asc')
110-
->get();
102+
103+
$userinfo = User::select('name', 'littlelink_name', 'littlelink_description', 'theme')->where('id', $id)->first();
104+
$information = User::select('name', 'littlelink_name', 'littlelink_description', 'theme')->where('id', $id)->get();
105+
106+
$links = DB::table('links')->join('buttons', 'buttons.id', '=', 'links.button_id')->select('links.link', 'links.id', 'links.button_id', 'links.title', 'links.custom_css', 'links.custom_icon', 'buttons.name')->where('user_id', $id)->orderBy('up_link', 'asc')->orderBy('order', 'asc')->get();
111107

112108
return view('littlelink', ['userinfo' => $userinfo, 'information' => $information, 'links' => $links, 'littlelink_name' => $littlelink_name]);
113109
}

0 commit comments

Comments
 (0)