validation not exists with this id laravel

Solutions on MaxInterview for validation not exists with this id laravel by the best coders in the world

showing results for - "validation not exists with this id laravel"
Marlene
29 Jul 2018
1$e = Subscription::find($request->subscription_id);
2$rules = [
3  'subscription_id' => 'required|integer|exists:subscriptions,id',
4  'date' => 'required|date|after:yesterday',
5  'date' => Rule::unique('member_attendances')->where(function ($query) use ($e) {
6              return $query->where('member_id', $e->member_id);
7})
8//|unique:member_attendances,date,'.$e->member_id . ',member_id',
9];