Answers for "validation not exists with this id laravel"

PHP
1

validation not exists with this id laravel

$e = Subscription::find($request->subscription_id);
$rules = [
  'subscription_id' => 'required|integer|exists:subscriptions,id',
  'date' => 'required|date|after:yesterday',
  'date' => Rule::unique('member_attendances')->where(function ($query) use ($e) {
              return $query->where('member_id', $e->member_id);
})
//|unique:member_attendances,date,'.$e->member_id . ',member_id',
];
Posted by: Guest on June-10-2021

Code answers related to "validation not exists with this id laravel"

Browse Popular Code Answers by Language