app/Http/Controllers/SocialController.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,$navigation_id)
    {
    $data=request()->validate([
       'social_name'=>'required',
       'icons'=>'required',
       'icon_url'=>'required'
    ]);
    $social=Social::create([
       'social_name'=>$data['social_name'],
       'icons'=>$data['icons'],
       'icon_url'=>$data['icon_url'],
       'navigation_id'=>$navigation_id
    ]);
    return redirect('/social');
    }
public function store ( Request $ request , $ navigation_id ) { $ data = request ( ) -> validate ( [ 'social_name' => 'required' , 'icons' => 'required' , 'icon_url' => 'required' ] ) ; $ social = Social :: create ( [ 'social_name' => $ data [ 'social_name' ] , 'icons' => $ data [ 'icons' ] , 'icon_url' => $ data [ 'icon_url' ] , 'navigation_id' => $ navigation_id ] ) ; return redirect ( '/social' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .