Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
GoldFishCMS Housekeeping problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Twan" data-source="post: 472444" data-attributes="member: 2387"><p>Hi,</p><p></p><p>We want to use GoldFishCMS for our hotel. Everything is working fine, only on some of the housekeeping pages, we get the following error:</p><p></p><p></p><p>This is the code from the UserController:</p><p>[SPOILER]</p><p>[CODE]<?php</p><p></p><p>namespace App\Http\Controllers\Housekeeping\UserMod;</p><p></p><p>use Request;</p><p>use Illuminate\Http\Request as Req;</p><p>use App\Http\Controllers\Controller;</p><p>use App\Helpers\CMS;</p><p>use App\Models\User\User as Users;</p><p>use App\Models\Hotel\Chatlog;</p><p></p><p></p><p>class UserController extends Controller</p><p>{</p><p> public function index($user = null, Req $request)</p><p> {</p><p> if (CMS::fuseRights('moderation_user')) {</p><p> if (Request::isMethod('post')) {</p><p> if (request()->has('edit')) {</p><p> Users::where('username', $user)->update(['motto' => request()->get('motto')]);</p><p> if (CMS::fuseRights('moderation_user_admin')) {</p><p> Users::where('username', $user)->update([</p><p> 'rank_id' => request()->get('rank_id'),</p><p> 'credits' => request()->get('credits')</p><p> ]);</p><p> }</p><p> $request->session()->flash('message', "User Saved!");</p><p> return redirect()->back();</p><p> }</p><p> $userdata = Users::where('username', 'LIKE', Request::input('username'))->first();</p><p></p><p> if (!empty($userdata)) {</p><p> return redirect('housekeeping/moderation/lookup/user/' . $userdata->username);</p><p> } else {</p><p> return redirect('housekeeping/moderation/lookup/user/');</p><p> }</p><p> }</p><p> if (empty($user)) {</p><p> $users = Users::orderBy('id', 'DESC')->paginate(15);</p><p> return view(</p><p> 'lookup.user',</p><p> [</p><p> 'group' => 'user',</p><p> 'users' => $users</p><p> ]</p><p> );</p><p> } else {</p><p> $userdata = Users::where('username', 'LIKE', $user)->first();</p><p> $alt = Users::where('ip_register', $userdata->ip_register)->get();</p><p> $chats = Chatlog::whereHas('room')->where('user_from_id', $userdata->id)->orderBy('timestamp', 'DESC')->paginate(25);</p><p> \App\Models\CMS\Hk::create([</p><p> 'user_id' => auth()->user()->id,</p><p> 'ip' => request()->ip(),</p><p> 'action' => 'Viewed '.$user,</p><p> 'timestamp' => time()</p><p> ]);</p><p> return view(</p><p> 'lookup.user',</p><p> [</p><p> 'group' => 'user',</p><p> 'user' => $userdata,</p><p> 'alt' => $alt,</p><p> 'chats' => $chats</p><p> ]</p><p> );</p><p> }</p><p> } else {</p><p> return redirect('housekeeping/dashboard');</p><p> }</p><p> }</p><p> public function online()</p><p> {</p><p> $users = Users::orderBy('id', 'DESC')->where('online', '1')->paginate(15);</p><p> return view(</p><p> 'usermod.online',</p><p> [</p><p> 'group' => 'user',</p><p> 'users' => $users</p><p> ]</p><p> );</p><p> }</p><p>}</p><p>[/CODE]</p><p>[/SPOILER]</p><p></p><p>If anyone could help us solve the problem, that would be great.</p><p></p><p>Regards,</p><p>Twan</p></blockquote><p></p>
[QUOTE="Twan, post: 472444, member: 2387"] Hi, We want to use GoldFishCMS for our hotel. Everything is working fine, only on some of the housekeeping pages, we get the following error: This is the code from the UserController: [SPOILER] [CODE]<?php namespace App\Http\Controllers\Housekeeping\UserMod; use Request; use Illuminate\Http\Request as Req; use App\Http\Controllers\Controller; use App\Helpers\CMS; use App\Models\User\User as Users; use App\Models\Hotel\Chatlog; class UserController extends Controller { public function index($user = null, Req $request) { if (CMS::fuseRights('moderation_user')) { if (Request::isMethod('post')) { if (request()->has('edit')) { Users::where('username', $user)->update(['motto' => request()->get('motto')]); if (CMS::fuseRights('moderation_user_admin')) { Users::where('username', $user)->update([ 'rank_id' => request()->get('rank_id'), 'credits' => request()->get('credits') ]); } $request->session()->flash('message', "User Saved!"); return redirect()->back(); } $userdata = Users::where('username', 'LIKE', Request::input('username'))->first(); if (!empty($userdata)) { return redirect('housekeeping/moderation/lookup/user/' . $userdata->username); } else { return redirect('housekeeping/moderation/lookup/user/'); } } if (empty($user)) { $users = Users::orderBy('id', 'DESC')->paginate(15); return view( 'lookup.user', [ 'group' => 'user', 'users' => $users ] ); } else { $userdata = Users::where('username', 'LIKE', $user)->first(); $alt = Users::where('ip_register', $userdata->ip_register)->get(); $chats = Chatlog::whereHas('room')->where('user_from_id', $userdata->id)->orderBy('timestamp', 'DESC')->paginate(25); \App\Models\CMS\Hk::create([ 'user_id' => auth()->user()->id, 'ip' => request()->ip(), 'action' => 'Viewed '.$user, 'timestamp' => time() ]); return view( 'lookup.user', [ 'group' => 'user', 'user' => $userdata, 'alt' => $alt, 'chats' => $chats ] ); } } else { return redirect('housekeeping/dashboard'); } } public function online() { $users = Users::orderBy('id', 'DESC')->where('online', '1')->paginate(15); return view( 'usermod.online', [ 'group' => 'user', 'users' => $users ] ); } } [/CODE] [/SPOILER] If anyone could help us solve the problem, that would be great. Regards, Twan [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
GoldFishCMS Housekeeping problem
Top