Code Duplication    Length = 8-11 lines in 2 locations

app/Http/Controllers/Admin/User/UserController.php 1 location

@@ 24-34 (lines=11) @@
21
     *
22
     * @return \Illuminate\View\View
23
     */
24
    public function index(): View
25
    {
26
        $latestUsers = User::with(['roles'])
27
            ->limit(5)
28
            ->latest()
29
            ->get();
30
31
        $breadcrumbs = $this->breadcrumbs->addCrumb('Manage Users', route('admin.user.user.index'));
32
33
        return view('Admin::User.user.index', compact('latestUsers', 'breadcrumbs'));
34
    }
35
    /**
36
     * Search users related to the type.
37
     *

app/Http/Controllers/Discuss/CategoryController.php 1 location

@@ 15-22 (lines=8) @@
12
     *
13
     * @return \Illuminate\View\View
14
     */
15
    public function index(): View
16
    {
17
        $categories = DiscussCategory::orderBy('title', 'asc')->get();
18
19
        $breadcrumbs = $this->breadcrumbs->addCrumb('All Categories', route('discuss.category.index'));
20
21
        return view('Discuss::category.index', compact('categories', 'breadcrumbs'));
22
    }
23
24
    /**
25
     * Display all conversations related to the category.