app/Http/Controllers/Admin/LianjieController.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)
    {
         $post = $request->except('_token');
          if ($request->hasFile('l_logo') ){
            $post['l_logo'] = $this->upload('l_logo');
        }
         $res = Lianjie::where('l_id',$id)->update($post);
        if($res!==false){
            return redirect('/lianjie');
        }
    }
public function update ( Request $ request , $ id ) { $ post = $ request -> except ( '_token' ) ; if ( $ request -> hasFile ( 'l_logo' ) ) { $ post [ 'l_logo' ] = $ this -> upload ( 'l_logo' ) ; } $ res = Lianjie :: where ( 'l_id' , $ id ) -> update ( $ post ) ; if ( $ res !== false ) { return redirect ( '/lianjie' ) ; } }
Update the specified resource in storage.
Update the specified resource in storage .