Update UserController.php
This commit is contained in:
parent
8e8d72f9a3
commit
7dce109163
|
@ -93,21 +93,17 @@ class UserController extends Controller
|
||||||
//Show littlelink page as home page if set in config
|
//Show littlelink page as home page if set in config
|
||||||
public function littlelinkhome(request $request)
|
public function littlelinkhome(request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
$littlelink_name = env('HOME_URL');
|
$littlelink_name = env('HOME_URL');
|
||||||
$id = User::select('id')->where('littlelink_name', $littlelink_name)->value('id');
|
$id = User::select('id')->where('littlelink_name', $littlelink_name)->value('id');
|
||||||
|
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
return abort(404);
|
return abort(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$userinfo = User::select('name', 'littlelink_name', 'littlelink_description', 'image', 'theme')->where('id', $id)->first();
|
$userinfo = User::select('name', 'littlelink_name', 'littlelink_description', 'theme')->where('id', $id)->first();
|
||||||
$information = User::select('name', 'littlelink_name', 'littlelink_description', 'image', 'theme')->where('id', $id)->get();
|
$information = User::select('name', 'littlelink_name', 'littlelink_description', 'theme')->where('id', $id)->get();
|
||||||
|
|
||||||
$links = DB::table('links')
|
$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();
|
||||||
->where('user_id', $id)
|
|
||||||
->orderBy('up_link', 'asc')->orderBy('order', 'asc')
|
|
||||||
->get();
|
|
||||||
|
|
||||||
return view('littlelink', ['userinfo' => $userinfo, 'information' => $information, 'links' => $links, 'littlelink_name' => $littlelink_name]);
|
return view('littlelink', ['userinfo' => $userinfo, 'information' => $information, 'links' => $links, 'littlelink_name' => $littlelink_name]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue