Gary Green
Gary Green
Probably not a good idea. In your example I would personally have a dedicated `->markConfirmed()` method or something on the model. This allows you to better encapsulate your logic surrounding...
@jpkleemans interesting idea with the accessor. I assume that works based on checking all the `dispatchesEvents` every single time an attribute changes? Sounds like a N+1 problem waiting to happen....
Also these lines here: ```php Route::patch('/payments/{payment}', function (Request $request, Payment $payment) { $updates = $request->post(); $payment->fill($updates); ``` I hope this is just example code and this isn't representative of what...
I too question the over-use of `tap()` it is quite an opinionated design decision. My main concern is it being used in core part of Laravel in complex loops, and...
@CamiloMM did you manage to fix the issue? I'm experiencing same problem with browserify and windows
Bump. Any thoughts @olivervogel ?
> Laravel doesn't do that and requires to write validation for array manually according to docs. Laravel does have array wildcard validation, older versions of Laravel used the `each` rule/function....
I don't think Laravel supports nested rules? Would make more sense to support wildcards instead.
It's not clear what your trying to achieve with your `fail_array` rule but you need to use the `array` rule. Check out the tests for array-based stuff: https://github.com/skaterdav85/validatorjs/blob/e0a41171218486adcdba06fbb6910e902ba893c2/spec/array.js https://github.com/skaterdav85/validatorjs/blob/e0a41171218486adcdba06fbb6910e902ba893c2/spec/require-rule.js#L72
You probably want your rules as `required|array|min:1` - no need for custom validation. That will check to make sure there is an array in the input and it's not empty.