$categorie); } /** * Store a newly created resource in storage. */ public function store(Request $request) { // $request->validate([ 'pattern' => 'required|string|max:255', 'category_id' => 'required|exists:categories,id', 'description' => 'nullable|string|max:255', 'is_active' => 'boolean', 'created_by' => 'nullable|string|max:255', ]); 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 } /** * Display the specified resource. */ public function show(ImportRule $importRule) { // } /** * Show the form for editing the specified resource. */ public function edit(ImportRule $importRule) { // } /** * Update the specified resource in storage. */ public function update(Request $request, ImportRule $importRule) { // } /** * Remove the specified resource from storage. */ public function destroy(ImportRule $importRule) { // } }