- Added new apis

This commit is contained in:
m.razaghi
2026-07-22 10:29:01 +03:30
parent 86c68951bb
commit a2799a8d1b
13 changed files with 334 additions and 15 deletions

View File

@@ -126,6 +126,12 @@ class BylawApiController extends Controller
->where('bylaw_document_id', $bylaw->id)
->get();
$formatted['highlight'] = \App\Models\BylawHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')
->where('user_id', auth()->id())
->where('bylaw_document_id', $bylaw->id)
->get();
if (!$formatted['is_locked']) {
$eloquentNodes = BylawNode::with('type')
->where('document_id', $bylaw->id)
@@ -353,6 +359,11 @@ class BylawApiController extends Controller
->where('bylaw_document_id', $item->id)
->get();
$formatted['highlight'] = \App\Models\BylawHighlight::select('id', 'start_index', 'end_index', 'selected_text', 'color_code')
->where('user_id', auth()->id())
->where('bylaw_document_id', $item->id)
->get();
return $formatted;
})->values()->toArray();