app/Http/Controllers/HRIndexController.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(Request $request)
    {
        $index = new HRIndex;
        $index->from_index = $request->from_index;
        $index->to_index = $request->to_index;
        $index->from_age = $request->from_age;
        $index->to_age = $request->to_age;
        $index->sex = $request->sex;
        $index->diagnose_id = $request->diagnose_id;
        $index->save();
        $request->session()->flash('alert-success', 'Đã tạo chỉ số thành công');
        return redirect('hrindex');
    }
public function store ( Request $ request ) { $ index = new HRIndex ; $ index -> from_index = $ request -> from_index ; $ index -> to_index = $ request -> to_index ; $ index -> from_age = $ request -> from_age ; $ index -> to_age = $ request -> to_age ; $ index -> sex = $ request -> sex ; $ index -> diagnose_id = $ request -> diagnose_id ; $ index -> save ( ) ; $ request -> session ( ) -> flash ( 'alert-success' , 'Đã tạo chỉ số thành công'); return redirect ( 'hrindex' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
//