remove codeigniter
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
- **Purpose**: shared API conveniences:
|
||||
- Standard success/error JSON envelope helpers
|
||||
- Request payload normalization (JSON body vs query/form)
|
||||
- Validation helper compatible with legacy CodeIgniter-like rules
|
||||
- Validation helper compatible with legacy-style rules
|
||||
- Lightweight pagination helper for arrays/query builders
|
||||
- Current-user resolution helpers (id + role list)
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
### Request normalization
|
||||
- Stores the underlying Laravel request as `laravelRequest`.
|
||||
- Wraps it in `CiRequestAdapter` as `$this->request` for compatibility patterns.
|
||||
- Wraps it in `request adapter` as `$this->request` for compatibility patterns.
|
||||
- `payloadData()`:
|
||||
- Uses JSON-decoded body when present and valid
|
||||
- Falls back to merged query + form data
|
||||
|
||||
### Validation
|
||||
- `validateRequest($data, $rules)`:
|
||||
- Normalizes CodeIgniter-like rule strings into Laravel rules via `normalizeRules()`.
|
||||
- Normalizes legacy-like rule strings into Laravel rules via `normalizeRules()`.
|
||||
- Saves validator to `$this->validator`.
|
||||
- Returns `[]` on success, or `errors()->toArray()` on failure.
|
||||
- `validate($rules)` validates against `payloadData()` and returns boolean.
|
||||
@@ -63,4 +63,3 @@
|
||||
- `getCurrentUser()`:
|
||||
- No auth → `null`
|
||||
- Role query failure → returns user with empty roles and logs error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user