skip to Main Content

weird laravel validation in nested array

I tried some validation rule like: Boolean and Required file with nested array field, but always failing for example, I tried creating form request like this: <?php namespace AppHttpRequestsTest; use IlluminateFoundationHttpFormRequest; class Test extends FormRequest { public function validationData() {…

VIEW QUESTION

Laravel – how to fix model boot method not working properly?

protected static function boot() { parent::boot(); self::creating(function ($model) { $model->unique_id = self::generateUniqueId(); }); self::deleting(function (Submission $submission) { Log::info('Deleting model:', ['model' => $submission]); dd($submission); // Delete all associated media $submission->clearMediaCollection('files'); $submission->clearMediaCollection('images'); }); } i have this method in my submission model…

VIEW QUESTION
Back To Top
Search