Code Duplication    Length = 7-8 lines in 2 locations

src/Http/Controllers/ArticlesController.php 2 locations

@@ 47-54 (lines=8) @@
44
     * @param \Yajra\CMS\Entities\Article $article
45
     * @return mixed
46
     */
47
    public function create(Article $article)
48
    {
49
        $article->published = true;
50
        $article->setHighestOrderNumber();
51
        $tags = Article::existingTags()->pluck('name');
52
53
        return view('administrator.articles.create', compact('article', 'tags'));
54
    }
55
56
    /**
57
     * Store a newly created article.
@@ 90-96 (lines=7) @@
87
     * @param \Yajra\CMS\Entities\Article $article
88
     * @return mixed
89
     */
90
    public function edit(Article $article)
91
    {
92
        $tags         = Article::existingTags()->pluck('name');
93
        $selectedTags = implode(',', $article->tagNames());
94
95
        return view('administrator.articles.edit', compact('article', 'tags', 'selectedTags'));
96
    }
97
98
    /**
99
     * Update selected article.