app/Http/Controllers/NewsController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\News  $news
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(UpdateNewRequest $request, $id)
    {
        $new = News::findOrFail($id);
        $inputs = $request->except('submit', 'image');
        $inputs['image'] = File::update('news', 'image', $new);
        $new->update($inputs);
        return $this->redirect($new);
    }
public function update ( UpdateNewRequest $ request , $ id ) { $ new = News :: findOrFail ( $ id ) ; $ inputs = $ request -> except ( 'submit' , 'image' ) ; $ inputs [ 'image' ] = File :: update ( 'news' , 'image' , $ new ) ; $ new -> update ( $ inputs ) ; return $ this -> redirect ( $ new ) ; }
Update the specified resource in storage.
Update the specified resource in storage .