Answers for "exists:categories,id except a value laravel"

PHP
0

exists:categories,id except a value laravel

There are two solutions that i found on the search

1. use laravel form select and prepend the null value in starting 
{!! Form::select('parent_id', $category_list->prepend('Select a parent (optional)', ''), $category->parent_id, ['class' => 'form-control']) !!}

2. Or use `sometimes` validation
  'email' => 'sometimes|required|email',
This will check if the value resides in the the data or column selected
Posted by: Guest on October-02-2020

Browse Popular Code Answers by Language