fix(Core): fix bug is lock

This commit is contained in:
2026-05-17 00:00:13 +03:30
parent 2796ce7de7
commit c3d798689c
8 changed files with 52 additions and 30 deletions

View File

@@ -24,7 +24,7 @@ class ChapterController extends Controller
$chapters->getCollection()->transform(function ($section) {
$section['is_locked'] = auth()->user()->isSubscriber() !== false ? false : Law::where('is_locked', $section['law_id'])->first()?->is_locked;
$section['is_locked'] = auth()->user()->isSubscriber() !== false ? false : Law::where('id', $section['law_id'])->first()?->is_locked;
unset($section['law_id']);
unset($section['section_id']);