Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,585 members, 7,958,814 topics. Date: Thursday, 26 September 2024 at 02:42 AM |
Nairaland Forum / Science/Technology / Programming / Chiwex Easy Website Development With Laravel: Image Upload Snippet (1189 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)
Teenage Girl Invents World’s Fastest Mobile Phone Battery Logged In As Fawole Ke / A.M (android Messenger) Live On Google Play Now. Check Out / My Observations
(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. 9 |