SHARE
TWEET

controller

a guest Feb 14th, 2020 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   public function updateAdditive(Request $request,$id)
  2.     {
  3.    
  4.         $input=$request->all();
  5.         dd($input);
  6.    
  7.         $additive = Additive::findOrFail($id) ;
  8.         if ($request->has('file')) {
  9.             $filename = $request->file->getClientOriginalName();
  10.             $request->file->store('public/upload');
  11.             $file = new Food;
  12.             $file->file = $filename;
  13.             //dd($request);
  14.             $input['file']=$file->file;
  15.        
  16.    
  17.         return redirect('admin/food-item/');
  18.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top