feat: add bylaw management features including documents, legal authorities, subject categories, and nodes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user