mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-02 08:19:33 -05:00
refactor: fixes and updates
- still need to add lang and test
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\BlacklistClient;
|
||||
use App\Models\Group;
|
||||
use App\Models\Internal;
|
||||
use App\Models\Page;
|
||||
@@ -48,7 +49,12 @@ class PageController extends Controller
|
||||
*/
|
||||
public function staff(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$staff = Group::with('users:id,username,group_id,title')->where('is_modo', '=', 1)->orWhere('is_admin', '=', 1)->get()->sortByDesc('position');
|
||||
$staff = Group::query()
|
||||
->with('users:id,username,group_id,title')
|
||||
->where('is_modo', '=', 1)
|
||||
->orWhere('is_admin', '=', 1)
|
||||
->get()
|
||||
->sortByDesc('position');
|
||||
|
||||
return \view('page.staff', ['staff' => $staff]);
|
||||
}
|
||||
@@ -58,7 +64,10 @@ class PageController extends Controller
|
||||
*/
|
||||
public function internal(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$internals = Internal::with('users')->get()->sortBy('name');
|
||||
$internals = Internal::query()
|
||||
->with('users')
|
||||
->get()
|
||||
->sortBy('name');
|
||||
|
||||
return \view('page.internal', ['internals' => $internals]);
|
||||
}
|
||||
@@ -68,7 +77,7 @@ class PageController extends Controller
|
||||
*/
|
||||
public function clientblacklist(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$clients = DB::table('blacklist_clients')->get();
|
||||
$clients = BlacklistClient::all();
|
||||
|
||||
return \view('page.blacklist.client', ['clients' => $clients]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user