Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function service_edit($id)
- {
- $service = Service::find($id);
- return view('Super_Admin/service/.service_edit')
- ->with('service', $service);
- }
- public function service_update(Request $request, $id)
- {
- $service = Service::find($id);
- $input['title_name'] = strtoupper ($request['title_name']);
- $input['link'] = strtoupper ($request['link']);
- $input['note'] = strtoupper ($request['note']);
- $input['image'] = time().'.'.$request->
- image->getClientOriginalExtension();
- $folder1 = public_path('WEBSITE-FILE/SERVICE/1');
- $path1 = $folder1 . $input['image']; // path 1
- $request->image->move($folder1, $input['image']);
- $path2 = public_path('WEBSITE-FILE/SERVICE/2')
- . $input['image']; // path 2
- $path3 = public_path('WEBSITE-FILE/SERVICE/3')
- . $input['image']; // path 3
- $path4 = public_path('WEBSITE-FILE/SERVICE/4')
- . $input['image']; // path 4
- File::copy($path1, $path2);
- File::copy($path1, $path3);
- File::copy($path1, $path4);
- $input->save();
- return back()->with('success','UPDATED SUCCESSFULLY .');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement