skip to Main Content

Laravel 9 required_if not validating

I'm using Laravel 9 and Livewire 2.0 I have an integer field called 'new_weight' that should validate required if the boolean checkbox 'stripped' is selected. Although 'stripped' is not selected, it's still validating as required. The validation $rules are being…

VIEW QUESTION

Laravel 8: create two different default app file

In the application there is column type where the type are: Users and Admin. I want to separate the app file of users to admin. I already edited the file of AuthenticatedSessionController if($user_details->type != 0) { return redirect()->intended(RouteServiceProvider::HOME); }else{ return…

VIEW QUESTION

livewire array inputs how to fix? – Laravel

my component livewire public $images = []; public function rules() { return [ 'images.*.name' => 'required|max:255', ]; } blade.php <div id="images"> @foreach($images as $index => $image) <div class="card" wire:key="image-field-{{$images[$index]['id']}}"> <img src="{{$images[$index]->original_url}}" class="card-img-top" alt="{{$images[$index]->name}}" /> <input type="text" name="item-{{$index}}-name" id="item.{{$index}}.name" wire:model="images.{{$index}}.name" />…

VIEW QUESTION
Back To Top
Search