app/Http/Controllers/PlayerController.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)
    {
        $player = new Player([
           'user_id' => Auth::user()->id,
           'name' => $request->get('name'),
           'email' => $request->get('email'),
           'coach_name' => $request->get('coach_name')
        ]);
        $player->save();
        return redirect('/home');
    }
public function store ( Request $ request ) { $ player = new Player ( [ 'user_id' => Auth :: user ( ) -> id , 'name' => $ request -> get ( 'name' ) , 'email' => $ request -> get ( 'email' ) , 'coach_name' => $ request -> get ( 'coach_name' ) ] ) ; $ player -> save ( ) ; return redirect ( '/home' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .