app/Http/Controllers/CommunicationCategoryController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(CommunicationCategoryRequest $request)
    {
        $this->validate($request, [
            'category_code' => 'required|unique:c4s_category,category_code',
            'category_description' => 'required',
            'category_group_id' => 'required',
        ]);
        $communicationcategories = CommunicationCategory::create([
            'category_code' => $request->input('category_code'),
            'category_description' => $request->input('category_description'),
            'category_group_id' => $request->input('category_group_id')
        ]);
        return redirect()->route('c4s category - create')->withStatus(__('Category Successfully Created.'));
    }
public function store ( CommunicationCategoryRequest $ request ) { $ this -> validate ( $ request , [ 'category_code' => 'required|unique:c4s_category,category_code' , 'category_description' => 'required' , 'category_group_id' => 'required' , ] ) ; $ communicationcategories = CommunicationCategory :: create ( [ 'category_code' => $ request -> input ( 'category_code' ) , 'category_description' => $ request -> input ( 'category_description' ) , 'category_group_id' => $ request -> input ( 'category_group_id' ) ] ) ; return redirect ( ) -> route ( 'c4s category - create' ) -> withStatus ( __ ( 'Category Successfully Created.' ) ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .