app/Http/Controllers/adfaculty.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(Request $request, $id)
    {
        $getname=request('name');
        $getmail=request('mail');
        $getphn=request('phn');
        $getcou=request('cou');
        $q=faculty::find($id);
        $q->name=$getname;
        $q->mailid=$getmail;
        $q->phone=$getphn;
        $q->course=$getcou;
       $q->save();
        return redirect ('/viewfaculty');
    }
public function update ( Request $ request , $ id ) { $ getname = request ( 'name' ) ; $ getmail = request ( 'mail' ) ; $ getphn = request ( 'phn' ) ; $ getcou = request ( 'cou' ) ; $ q = faculty :: find ( $ id ) ; $ q -> name = $ getname ; $ q -> mailid = $ getmail ; $ q -> phone = $ getphn ; $ q -> course = $ getcou ; $ q -> save ( ) ; return redirect ( '/viewfaculty' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
//echo "Successfully added"; // $pt->choice="";