app/Http/Controllers/CommoCategoryController.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(CommoCategoryRequest $request)
    {
        $this->validate($request, [
            'commo_code' => 'required|unique:c4s_commo_category,commo_code',
            'commo_category' => 'required',
            'commo_desc' => 'required',
            'category_group_id' => 'required',
            'category_id' => 'required',
        ]);
        $commocategories = CommoCategory::create([
            'commo_code' => $request->input('commo_code'),
            'commo_category' => $request->input('commo_category'),
            'commo_desc' => $request->input('commo_desc'),
            'category_group_id' => $request->input('category_group_id'),
            'category_id' => $request->input('category_id')
        ]);
        return redirect()->route('c4s commo category - create')->withStatus(__('Commo Category Successfully Created.'));
    }
public function store ( CommoCategoryRequest $ request ) { $ this -> validate ( $ request , [ 'commo_code' => 'required|unique:c4s_commo_category,commo_code' , 'commo_category' => 'required' , 'commo_desc' => 'required' , 'category_group_id' => 'required' , 'category_id' => 'required' , ] ) ; $ commocategories = CommoCategory :: create ( [ 'commo_code' => $ request -> input ( 'commo_code' ) , 'commo_category' => $ request -> input ( 'commo_category' ) , 'commo_desc' => $ request -> input ( 'commo_desc' ) , 'category_group_id' => $ request -> input ( 'category_group_id' ) , 'category_id' => $ request -> input ( 'category_id' ) ] ) ; return redirect ( ) -> route ( 'c4s commo category - create' ) -> withStatus ( __ ( 'Commo Category Successfully Created.' ) ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .