@@ -4,58 +4,43 @@ namespace DummyNamespace;
44
55use Binaryk\LaravelRestify\Http\Requests\RestifyRequest;
66use Binaryk\LaravelRestify\Repositories\Repository as RestifyRepository;
7- use Illuminate\Contracts\Pagination\Paginator;
87
98abstract class Repository extends RestifyRepository
109{
10+
1111 /**
12- * Build an "index" query for the given repository.
12+ * Build a "show" and "index" query for the given repository.
1313 *
1414 * @param RestifyRequest $request
1515 * @param \Illuminate\Database\Eloquent\Builder $query
1616 * @return \Illuminate\Database\Eloquent\Builder
1717 */
18- public static function indexQuery (RestifyRequest $request, $query)
18+ public static function mainQuery (RestifyRequest $request, $query)
1919 {
2020 return $query;
2121 }
2222
2323 /**
24- * Build an "detail " query for the given repository.
24+ * Build an "index " query for the given repository.
2525 *
2626 * @param RestifyRequest $request
2727 * @param \Illuminate\Database\Eloquent\Builder $query
2828 * @return \Illuminate\Database\Eloquent\Builder
2929 */
30- public static function detailQuery (RestifyRequest $request, $query)
30+ public static function indexQuery (RestifyRequest $request, $query)
3131 {
3232 return $query;
3333 }
3434
35- public function index(RestifyRequest $request)
36- {
37- return parent::index($request);
38- }
39-
40- public function show(RestifyRequest $request, $repositoryId)
41- {
42- return parent::show($request, $repositoryId);
43- }
44-
45-
46- public function store(RestifyRequest $request)
47- {
48- return parent::store($request);
49- }
50-
51- public function update(RestifyRequest $request, $repositoryId)
52- {
53- return parent::update($request, $repositoryId);
54- }
55-
56- public function destroy(RestifyRequest $request, $repositoryId)
35+ /**
36+ * Build a "show" query for the given repository.
37+ *
38+ * @param RestifyRequest $request
39+ * @param \Illuminate\Database\Eloquent\Builder $query
40+ * @return \Illuminate\Database\Eloquent\Builder
41+ */
42+ public static function detailQuery(RestifyRequest $request, $query)
5743 {
58- return parent::destroy($request, $repositoryId) ;
44+ return $query ;
5945 }
60-
6146}
0 commit comments