parent
cd1f2a7e11
commit
ae7d23c4dd
app/Membership
|
@ -18,13 +18,15 @@ class MembershipController extends Controller
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function destroy(Member $member, Membership $membership): RedirectResponse
|
public function destroy(Member $member, Membership $membership, NamiSettings $settings): RedirectResponse
|
||||||
{
|
{
|
||||||
auth()->user()->api()->group($member->group->nami_id)->member($member->nami_id)
|
$api = $settings->login();
|
||||||
->deleteMembership($membership->nami_id);
|
$api->deleteMembership(
|
||||||
|
$member->nami_id,
|
||||||
|
$api->membership($member->nami_id, $membership->nami_id)
|
||||||
|
);
|
||||||
$membership->delete();
|
$membership->delete();
|
||||||
$member->syncVersion(auth()->user()->api());
|
$member->syncVersion();
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue