app/Http/Controllers/NavcontactController.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,$n_id)
    {
        $data=request()->validate([
           'contact_item'=>'required',
           'contact_url'=>'required',
           'contact_icons'=>'required'
        ]);
        $navcontact=Navcontact::create([
           'contact_item'=>$data['contact_item'],
           'contact_url'=>$data['contact_url'],
           'contact_icons'=>$data['contact_icons'],
           'navigation_id'=>$n_id,
        ]);
        return redirect('/navcontact');
    }
public function store ( Request $ request , $ n_id ) { $ data = request ( ) -> validate ( [ 'contact_item' => 'required' , 'contact_url' => 'required' , 'contact_icons' => 'required' ] ) ; $ navcontact = Navcontact :: create ( [ 'contact_item' => $ data [ 'contact_item' ] , 'contact_url' => $ data [ 'contact_url' ] , 'contact_icons' => $ data [ 'contact_icons' ] , 'navigation_id' => $ n_id , ] ) ; return redirect ( '/navcontact' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .