app/Http/Controllers/CategoryGroupController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\CategoryGroup  $categoryGroup
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Request $request, CategoryGroup $categorygroup)
    {
        $category_group_code = $request->input('category_group_code');
        $category_group_desc = $request->input('category_group_desc');
        $audittrails = AuditTrail::create([
            'user_id' => $request->input('user_id'),
            'action' => $request->input('action'),
            'remarks' => "Deleted a record with the fields of <font class='text-danger'>$category_group_code</font> and <font class='text-danger'>$category_group_desc</font>"
        ]);
        CategoryGroup::where('id', $categorygroup->id)->delete();
        return redirect()->route('c4s category group')->withStatus(__('Category Groups Successfully Deleted.'));
    }
public function destroy ( Request $ request , CategoryGroup $ categorygroup ) { $ category_group_code = $ request -> input ( 'category_group_code' ) ; $ category_group_desc = $ request -> input ( 'category_group_desc' ) ; $ audittrails = AuditTrail :: create ( [ 'user_id' => $ request -> input ( 'user_id' ) , 'action' => $ request -> input ( 'action' ) , 'remarks' => " Deleted a record with the fields of <font class='text-danger'> $ category_group_code </font> and <font class='text-danger'> $ category_group_desc </font> " ] ) ; CategoryGroup :: where ( 'id' , $ categorygroup -> id ) -> delete ( ) ; return redirect ( ) -> route ( 'c4s category group' ) -> withStatus ( __ ( 'Category Groups Successfully Deleted.' ) ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .