crystoline /
laravel-rest-api
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Crystoline\LaraRestApi; |
||
| 4 | use Illuminate\Database\Eloquent\Builder; |
||
| 5 | use Illuminate\Http\Request; |
||
|
0 ignored issues
–
show
|
|||
| 6 | interface IRestApiAble |
||
| 7 | {
|
||
| 8 | public static function getModel() : string ; |
||
| 9 | |||
| 10 | public function index(Request $request); |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Paginate Data |
||
| 14 | * @param Request $request |
||
| 15 | * @param Builder $data |
||
| 16 | * @param int $pages |
||
| 17 | * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator|Builder |
||
| 18 | */ |
||
| 19 | public static function paginate(Request $request, $data, $pages = 50); |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Filter data using request |
||
| 23 | * @param Request $request |
||
| 24 | * @param $query |
||
| 25 | */ |
||
| 26 | static function filter(Request $request, $query); |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Perform wild-card search |
||
| 30 | * @param Request $request |
||
| 31 | * @param Builder $builder |
||
| 32 | * @param $searchables |
||
| 33 | * return none, Builder passed by reference |
||
| 34 | */ |
||
| 35 | public static function doSearch(Request $request, Builder $builder, $searchables) ; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Order Data |
||
| 39 | * @param Request $request |
||
| 40 | * @param Builder $builder |
||
| 41 | * @param array $orderBy |
||
| 42 | */ |
||
| 43 | public static function doOrderBy(Request $request, Builder $builder,array $orderBy); |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Perform action before data list |
||
| 47 | * @param $data |
||
| 48 | */ |
||
| 49 | public function beforeList($data); |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Show records. |
||
| 53 | * @param $id |
||
| 54 | * @return \Illuminate\Http\JsonResponse |
||
|
0 ignored issues
–
show
The type
Illuminate\Http\JsonResponse was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 55 | */ |
||
| 56 | public function show(int $id); |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Perform action before data show |
||
| 60 | * @param $data |
||
| 61 | */ |
||
| 62 | public function beforeShow($data); |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Store Record. |
||
| 66 | * @param Request $request |
||
| 67 | * @return \Illuminate\Http\JsonResponse |
||
| 68 | */ |
||
| 69 | public function store(Request $request); |
||
| 70 | |||
| 71 | /** |
||
| 72 | * Perform action after data store |
||
| 73 | * @param Request $request |
||
| 74 | * @param $data |
||
| 75 | * @return bool |
||
| 76 | */ |
||
| 77 | public function afterStore(Request $request, $data): bool; |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Perform action before data store |
||
| 81 | * @param Request $request |
||
| 82 | * @return bool |
||
| 83 | */ |
||
| 84 | public function beforeStore(Request $request): bool; |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Perform action before data deletion |
||
| 88 | * @param Request $request |
||
| 89 | * @return bool |
||
| 90 | */ |
||
| 91 | public function beforeDelete(Request $request): bool; |
||
| 92 | |||
| 93 | /** |
||
| 94 | * Update Record. |
||
| 95 | * |
||
| 96 | * @param Request $request |
||
| 97 | * @param $id |
||
| 98 | * |
||
| 99 | * @return \Illuminate\Http\JsonResponse |
||
| 100 | */ |
||
| 101 | public function update(Request $request, int $id); |
||
| 102 | |||
| 103 | /** |
||
| 104 | * Run after update action |
||
| 105 | * @param Request $request |
||
| 106 | * @param $data |
||
| 107 | * @return bool |
||
| 108 | */ |
||
| 109 | public function afterUpdate(Request $request, $data): bool; |
||
| 110 | |||
| 111 | /** |
||
| 112 | * Run before update action |
||
| 113 | * @param Request $request |
||
| 114 | * @return bool |
||
| 115 | */ |
||
| 116 | public function beforeUpdate(Request $request): bool; |
||
| 117 | |||
| 118 | /** |
||
| 119 | * Delete Record. |
||
| 120 | * |
||
| 121 | * @param $id |
||
| 122 | * |
||
| 123 | * @return \Illuminate\Http\JsonResponse |
||
| 124 | */ |
||
| 125 | public function destroy(int $id); |
||
| 126 | |||
| 127 | |||
| 128 | |||
| 129 | /** |
||
| 130 | * Perform file upload for request |
||
| 131 | * @param Request $request |
||
| 132 | * @param Model $object |
||
|
0 ignored issues
–
show
The type
Crystoline\LaraRestApi\Model was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 133 | */ |
||
| 134 | public static function doUpload(Request $request, $object = null); |
||
| 135 | |||
| 136 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths