app/Http/Controllers/StudentController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(StudentRequest $request, $id)
    {
        $data = $request->all();
        $data['foto'] = $request->file('foto')->store('assets/students','public');
        Student::find($id)->update($data);
        return redirect()->route('home');
    }
public function update ( StudentRequest $ request , $ id ) { $ data = $ request -> all ( ) ; $ data [ 'foto' ] = $ request -> file ( 'foto' ) -> store ( 'assets/students' , 'public' ) ; Student :: find ( $ id ) -> update ( $ data ) ; return redirect ( ) -> route ( 'home' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .