Code Duplication    Length = 7-7 lines in 2 locations

src/Http/Controllers/CategoryController.php 1 location

@@ 34-40 (lines=7) @@
31
        return redirect()->route('categories');
32
    }
33
34
    public function show(Category $category)
35
    {
36
        $item = $category;
37
        $posts = LaravelBlog::where('published', '=', true)->where('category_id', '=', $item->id)->orderBy('published_at', 'desc')->get();
38
39
        return view('laravel-blog::archive', compact('item', 'posts'));
40
    }
41
42
    public function edit(Category $category)
43
    {

src/Http/Controllers/LaravelBlogController.php 1 location

@@ 233-239 (lines=7) @@
230
        return view('laravel-blog::blog_admin', compact('posts'));
231
    }
232
233
    public function indexAuthor($user_name)
234
    {
235
        $item = User::where('name', '=', $user_name)->first();
236
        $posts = LaravelBlog::where('published', '=', true)->where('user_id', '=', $item->id)->orderBy('published_at', 'desc')->get();
237
238
        return view('laravel-blog::archive', compact('item', 'posts'));
239
    }
240
}
241