kambuku/app/Http/Controllers/Admin/SafetyGuidelines.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)
    {
        if (isset($request['is_active']))
        {
            $request->request->add(['is_active' => '1']);
        }else{
            $request->request->add(['is_active' => '0']);
        }
        dd(\Request::input());
        safety_guidelines::create([
            'guide' => $request['guide'],
            'order' => $request['order'],
            'title' => $request['title'],
            'is_active' => $request['is_active']
        ]);
        $request->session()->flash('message', 'Guide Successfully Created');
        return redirect()->back();
    }
public function store ( Request $ request ) { if ( isset ( $ request [ 'is_active' ] ) ) { $ request -> request -> add ( [ 'is_active' => '1' ] ) ; } else { $ request -> request -> add ( [ 'is_active' => '0' ] ) ; } safety_guidelines :: create ( [ 'guide' => $ request [ 'guide' ] , 'order' => $ request [ 'order' ] , 'title' => $ request [ 'title' ] , 'is_active' => $ request [ 'is_active' ] ] ) ; $ request -> session ( ) -> flash ( 'message' , 'Guide Successfully Created' ) ; return redirect ( ) -> back ( ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// //dd(\Request::input());