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

How to change the default home path in Laravel 11?

<?php namespace AppProviders; use IlluminateCacheRateLimitingLimit; use IlluminateFoundationSupportProvidersRouteServiceProvider as ServiceProvider; use IlluminateHttpRequest; use IlluminateSupportFacadesRateLimiter; use IlluminateSupportFacadesRoute; class RouteServiceProvider extends ServiceProvider { /** * The path to your application's "home" route. * * Typically, users are redirected here after authentication. * *…

VIEW QUESTION

Can't run laravel with php artisan serve command

ErrorException Undefined array key 1 at vendorlaravelframeworksrcIlluminateFoundationConsoleServeCommand.php:368 364▕ $line = str_replace(' ', ' ', $line); 365▕ 366▕ preg_match($regex, $line, $matches); 367▕ ➜ 368▕ return Carbon::createFromFormat('D M d H:i:s Y', $matches[1]); 369▕ } 370▕ 371▕ /** 372▕ * Get the request…

VIEW QUESTION
Back To Top
Search