Creato funzione di filtraggio e assegnazione categoria in importazione in base alle regole di assegnazione

This commit is contained in:
2025-08-07 08:26:43 +02:00
parent 652f9a7e76
commit f82f65a0c5
6 changed files with 59 additions and 9 deletions

View File

@@ -44,7 +44,15 @@ class ImportRuleController extends Controller
'is_active' => 'boolean',
'created_by' => 'nullable|string|max:255',
]);
ImportRule::create($request->all());
ImportRule::create(
[
'category_id'=>$request->category_id,
'pattern'=>$request->pattern,
'description'=>$request->description,
'is_active'=>1,
]
);
return redirect()->route('import_rules.index'); // Redirect to the index after storing the rule
}