feat: add bylaw management features including documents, legal authorities, subject categories, and nodes

This commit is contained in:
2026-06-26 13:49:50 +03:30
parent 2e26bd229b
commit 9cf6957675
113 changed files with 1112 additions and 358 deletions

View File

@@ -17,7 +17,7 @@ class SectionController extends Controller
$query = Section::query();
if ($request->filled('q')) {
$query->where('title', 'like', '%' . $request->q . '%');
$query->where('title', 'like', '%'.$request->q.'%');
}
$perPage = min(max((int) $request->input('per_page', 15), 10), 100);
@@ -34,7 +34,7 @@ class SectionController extends Controller
$sections = Section::all();
$divisions = Division::all();
return view('admin.section.create', compact('books', 'volums', 'laws','sections','divisions'));
return view('admin.section.create', compact('books', 'volums', 'laws', 'sections', 'divisions'));
}
public function store(Request $request)
@@ -45,7 +45,7 @@ class SectionController extends Controller
'book_id' => 'nullable',
'volum_id' => 'nullable',
'law_id' => 'nullable',
'division_id' => 'nullable'
'division_id' => 'nullable',
]);
section::query()->create($validated);
@@ -60,8 +60,8 @@ class SectionController extends Controller
$laws = Law::all();
$sections = Section::all();
$divisions = Division::all();
return view('admin.section.update', compact('section', 'books', 'volums', 'laws','sections','divisions'));
return view('admin.section.update', compact('section', 'books', 'volums', 'laws', 'sections', 'divisions'));
}
public function update(Request $request, Section $section)
@@ -72,7 +72,7 @@ class SectionController extends Controller
'book_id' => 'nullable',
'volum_id' => 'nullable',
'law_id' => 'nullable',
'division_id' => 'nullable'
'division_id' => 'nullable',
]);
$section->update($validated);