Code Duplication    Length = 7-7 lines in 2 locations

src/Modules/V1/Core/Http/Controllers/BaseApiController.php 2 locations

@@ 52-58 (lines=7) @@
49
     * @param  boolean $desc   Sort ascending or descinding (1: desc, 0: asc).
50
     * @return \Illuminate\Http\Response
51
     */
52
    public function index($sortBy = 'created_at', $desc = 1) 
53
    {
54
        if ($this->repo)
55
        {
56
            return \Response::json($this->repo->all($this->relations, $sortBy, $desc), 200);
57
        }
58
    }
59
60
    /**
61
     * Fetch the single object with relations from storage.
@@ 132-138 (lines=7) @@
129
     * @param  boolean $desc    Sort ascending or descinding (1: desc, 0: asc).
130
     * @return \Illuminate\Http\Response
131
     */
132
    public function paginate($perPage = 15, $sortBy = 'created_at', $desc = 1) 
133
    {
134
        if ($this->repo) 
135
        {
136
            return \Response::json($this->repo->paginate($perPage, $this->relations, $sortBy, $desc), 200);
137
        }
138
    }
139
140
    /**
141
     * Fetch all records with relations based on