Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,828 members, 7,956,141 topics. Date: Monday, 23 September 2024 at 05:11 AM |
Nairaland Forum / Science/Technology / Programming / Chiwex Easy Website Development With Laravel: Image Upload Snippet (1188 Views)
Image Upload In Mongodb And Nodejs With Multer Doesn't Work After Hosting The Ap / LAGOS Professional Training On Web Design&development With Certification.. (2) (3) (4)
(1) (Reply)
Chiwex Easy Website Development With Laravel: Image Upload Snippet by chiwex(m): 10:10pm On Nov 23, 2015 |
Note: snippet for laravel programmers 1. create a form with input having a name attribute with file as it's value 2. create a controller with the method i provided public function imageUpload(Request $request){ if ($request->hasFile('file')) { $image = $request->file('file'); $ext = $image->getClientOriginalExtension(); $filename = md5($image->getClientOriginalName()) . '.' . $ext; $image->move( public_path() . '/uploads/', $filename); return response()->json([asset('uploads/' . $filename ) ]); } } 1 Like |
Re: Chiwex Easy Website Development With Laravel: Image Upload Snippet by godofbrowser(m): 1:09pm On Oct 13, 2016 |
Hello, can you write me at ajemeke@gmail.com? I've got something for you as regards laravel. |
(1) (Reply)
Web/graphics Designing. / Upgrade Your App To Angular 2 – Tutsplus / Does Nairaland Admin Have Users Login Name And Password Or Just Passwords
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7 |