SHARE
TWEET

Untitled

a guest Jun 16th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function service_edit($id)
  2. {
  3. $service = Service::find($id);
  4. return view('Super_Admin/service/.service_edit')
  5. ->with('service', $service);
  6. }
  7. public function service_update(Request $request, $id)
  8. {
  9. $service = Service::find($id);
  10. $input['title_name'] = strtoupper ($request['title_name']);
  11. $input['link'] = strtoupper ($request['link']);
  12. $input['note'] = strtoupper ($request['note']);
  13. $input['image'] = time().'.'.$request->
  14. image->getClientOriginalExtension();
  15. $folder1 = public_path('WEBSITE-FILE/SERVICE/1');
  16. $path1 = $folder1 . $input['image']; // path 1
  17. $request->image->move($folder1, $input['image']);
  18. $path2 = public_path('WEBSITE-FILE/SERVICE/2')
  19. . $input['image']; // path 2
  20. $path3 = public_path('WEBSITE-FILE/SERVICE/3')
  21. . $input['image']; // path 3
  22. $path4 = public_path('WEBSITE-FILE/SERVICE/4')
  23. . $input['image']; // path 4
  24. File::copy($path1, $path2);
  25. File::copy($path1, $path3);
  26. File::copy($path1, $path4);
  27. $input->save();
  28. return back()->with('success','UPDATED SUCCESSFULLY .');
  29. }
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