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

@@ -21,7 +21,7 @@ class BranchController extends Controller
$query = Branch::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);
@@ -41,7 +41,7 @@ class BranchController extends Controller
$sections = Section::all();
$divisions = Division::all();
return view('admin.branch.create', compact('chapters', 'parts', 'gates', 'books', 'volums', 'laws', 'sections','divisions'));
return view('admin.branch.create', compact('chapters', 'parts', 'gates', 'books', 'volums', 'laws', 'sections', 'divisions'));
}
public function store(Request $request)
@@ -75,7 +75,7 @@ class BranchController extends Controller
$sections = Section::all();
$divisions = Division::all();
return view('admin.branch.update', compact('branch', 'chapters', 'parts', 'gates', 'books', 'volums', 'laws', 'sections','divisions'));
return view('admin.branch.update', compact('branch', 'chapters', 'parts', 'gates', 'books', 'volums', 'laws', 'sections', 'divisions'));
}
public function update(Request $request, Branch $branch)
@@ -83,7 +83,7 @@ class BranchController extends Controller
$validated = $request->validate([
'title' => 'required',
'number' => 'required',
'number' => 'required',
'chapter_id' => 'nullable',
'part_id' => 'nullable',
'gate_id' => 'nullable',
@@ -104,5 +104,5 @@ class BranchController extends Controller
$branch->delete();
return redirect(route('branch.index'));
}
}
}