feat: add bylaw management features including documents, legal authorities, subject categories, and nodes
This commit is contained in:
@@ -18,7 +18,7 @@ class ChapterController extends Controller
|
||||
$query = Chapter::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);
|
||||
@@ -35,7 +35,7 @@ class ChapterController extends Controller
|
||||
$sections = Section::all();
|
||||
$divisions = Division::all();
|
||||
|
||||
return view('admin.chapter.create', compact('sections', 'books', 'volums', 'laws','divisions'));
|
||||
return view('admin.chapter.create', compact('sections', 'books', 'volums', 'laws', 'divisions'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
@@ -47,7 +47,7 @@ class ChapterController extends Controller
|
||||
'book_id' => 'nullable',
|
||||
'volum_id' => 'nullable',
|
||||
'law_id' => 'nullable',
|
||||
'division_id' => 'nullable'
|
||||
'division_id' => 'nullable',
|
||||
]);
|
||||
|
||||
Chapter::query()->create($validated);
|
||||
@@ -63,7 +63,7 @@ class ChapterController extends Controller
|
||||
$laws = Law::all();
|
||||
$divisions = Division::all();
|
||||
|
||||
return view('admin.chapter.update', compact('sections', 'chapter', 'books', 'volums', 'laws','divisions'));
|
||||
return view('admin.chapter.update', compact('sections', 'chapter', 'books', 'volums', 'laws', 'divisions'));
|
||||
}
|
||||
|
||||
public function update(Request $request, Chapter $chapter)
|
||||
@@ -75,7 +75,7 @@ class ChapterController extends Controller
|
||||
'book_id' => 'nullable',
|
||||
'volum_id' => 'nullable',
|
||||
'law_id' => 'nullable',
|
||||
'division_id' => 'nullable'
|
||||
'division_id' => 'nullable',
|
||||
]);
|
||||
|
||||
$chapter->update($validated);
|
||||
|
||||
Reference in New Issue
Block a user