Image Uploads with Laravel

  Рет қаралды 54,100

devdojo

devdojo

Күн бұрын

Пікірлер: 53
@MrPkmonster
@MrPkmonster 7 жыл бұрын
For people using Laravel 5.4, adding {{ csrf_field() }} inside tag
@ververvanhier
@ververvanhier 8 жыл бұрын
Hey Great video devmojo! For people using laravel 5 just replace use \Input as Input; with use Illuminate\Support\Facades\Input; in it will work ;)
@AbdulMajeedShehzad
@AbdulMajeedShehzad 7 жыл бұрын
Thank you Sir ! Still people like you exists :)
@udvaribalazs23
@udvaribalazs23 5 жыл бұрын
Thank you!
@tysweezy
@tysweezy 8 жыл бұрын
For the CSRF token, I believe you can also add {!! csrf_field() !!} within the form in your blade file. That will load the hidden input field. :) Awesome job on this video. :)
@soubarnobanerjee8257
@soubarnobanerjee8257 6 жыл бұрын
Thank you so much sir. My respect for you is 100% for being a fantastic teacher. :D
@ehguacho2008
@ehguacho2008 6 жыл бұрын
surely an aside comment, but gotta say it: i loved your terminal's color scheme ^^
@donnise2509
@donnise2509 8 жыл бұрын
Hi Great Video! I want to ask if how can I store the images in my database? Thanks a lot! :)
@Moatazaitoun
@Moatazaitoun 8 жыл бұрын
@devdojo Man, That was super easy. Thank you. But the questation is: Why when I used "use \Input as Input" as you told It didn't work. But When I replaced this statement with "use Illuminate\Support\Facades\Input;" It worked just fine?
@nabaus6170
@nabaus6170 8 жыл бұрын
great simple video thanks a bunch
@vinayaksaxena7167
@vinayaksaxena7167 8 жыл бұрын
Nice Work Sir
@srijanaaryal7767
@srijanaaryal7767 6 жыл бұрын
Thank you soo much it really works....
@fikri.abdoul
@fikri.abdoul 8 жыл бұрын
Great video, helps me alot
@DuongNguyen-je3zb
@DuongNguyen-je3zb 7 жыл бұрын
Hi! Thanks for great tutorial. But I can not find your tutorial video about intervention anywhere. Can you please tell me where to find your video?
@vishwas62
@vishwas62 8 жыл бұрын
nice work , keep it up sir :)
@filipmihal1851
@filipmihal1851 8 жыл бұрын
Hi, can you help me, how to compress image on client site, because uploading on my site takes very long time. Thanks ;)
@jenpatrickcn
@jenpatrickcn 7 жыл бұрын
@devdojo, can you make a tutorial for image gallery?
@KT-ut9zg
@KT-ut9zg 7 жыл бұрын
Off topic, but what is the terminal program you're using? Went hunting for something online but couldn't find anything that looked as nice as that
@KT-ut9zg
@KT-ut9zg 7 жыл бұрын
Oh my ZSH - gottit!
@DznKux
@DznKux 8 жыл бұрын
Great Video! However, I got 'Fatal error: Class 'Input' not found'. I am not sure where the problem is. Could you please tell me how to fix this ?
@abdussalama.h.f6163
@abdussalama.h.f6163 6 жыл бұрын
Thank You
@saurav1502
@saurav1502 7 жыл бұрын
can u show the download process like how to download the uploaded files
@salaheddinerakibe5760
@salaheddinerakibe5760 7 жыл бұрын
Thanks a lot
@yassinmakni5630
@yassinmakni5630 6 жыл бұрын
how did you generate the html code with form_upload ?
@bobbylight4205
@bobbylight4205 9 жыл бұрын
How did you change the appearance of the terminal? Great video btw.
@Devdojo
@Devdojo 9 жыл бұрын
+Kevin Manapparambil +Jeramee Flemming I'm using solarized dark: ethanschoonover.com/solarized theme. Hope that helps :)
@bobbylight4205
@bobbylight4205 9 жыл бұрын
devdojo Thanks! I'll be sure to give this a try.
@AtomCoder
@AtomCoder 7 жыл бұрын
What mac terminal are you using ?
@johnspotifi2526
@johnspotifi2526 8 жыл бұрын
Hey mate, is the intervention image package vid already available? :)
@Devdojo
@Devdojo 8 жыл бұрын
+john spotifi Not yet, we'll be sure to get it out soon since Laravel 5.2 just got released. Thanks :)
@IvensPontes
@IvensPontes 7 жыл бұрын
I can make an validation and don't use if has?
@video88548
@video88548 7 жыл бұрын
hi, i have made it to the final stage and this error appears. FatalErrorException in UploadController.php line 5: syntax error, unexpected 'class' (T_CLASS), expecting ',' or ';' where my mistake? thanks
@srilalitha6423
@srilalitha6423 8 жыл бұрын
Hi, 'Input::hasFile('file')' returns null value. Anything echoed in this condition is not displayed. can you help me
@butcherfirewaters
@butcherfirewaters 4 жыл бұрын
Hi ! How I can uploade Gallery of images?
@tharochhith1173
@tharochhith1173 8 жыл бұрын
why it said can't find class input
@josetutiven8835
@josetutiven8835 9 жыл бұрын
looks nice, but I was looking for a way to upload an image to the mysql database without moving the file but actually uploading the binary content of the file as a blob, that is fairly easy with simple php but I can't seem to find a way to do it with laravel, do you know if there is a way to do that?
@Devdojo
@Devdojo 8 жыл бұрын
+Jose Tutiven Sure, you could totally do this. Here is an article that explains how to store them in a database: stackoverflow.com/questions/1636877/how-can-i-store-and-retrieve-images-from-a-mysql-database-using-php Hope that helps. Thanks.
@heyyy4987
@heyyy4987 8 жыл бұрын
amazing.:)
@SudhirKumar-ov6ee
@SudhirKumar-ov6ee 6 жыл бұрын
hello, i want you to make a video on a project assign below so that we all your viewers got benefited, plz do it Please create three pages in LARAVEL. Task list: 1) Create page to add news. Fields are news title, description and news picture. - Validate below fields: - news title (required) 2) On page submit, redirect news to 'Success' page and display entered news's title on screen. 3) Create another page where all news will be listed with news title and uploaded pic in list view. If news click on news name then it will redirect to news detail page where you need to display all news's data. Note: 1) Page should have common header with logo and menu with link to add news and view news list. 2) All data should be stored in database. 3) For validation, use Laravel inbuild validation functionality
@ALEXEIS
@ALEXEIS 6 жыл бұрын
I can do that, but I don't make tutorial videos.
@RamKumar-uh5gw
@RamKumar-uh5gw 9 жыл бұрын
this is a cool experience .. but what next ?? i mean what about storing image url into database so when a user login once again then they can get there profile picture .. please provide the video
@Devdojo
@Devdojo 9 жыл бұрын
+Ram Kumar Hey Ram, absolutely. We'll be posting more videos soon that can show you more after uploading the image :) Thanks for the comment.
@rajapurva2012
@rajapurva2012 9 жыл бұрын
+devdojo Still waiting !
@bulldog2024
@bulldog2024 6 жыл бұрын
What if I want to store images in a database instead of a folder?
@ALEXEIS
@ALEXEIS 6 жыл бұрын
A database can't store files. Only texts. You will need to save the name of the image i.e "butterfly.jpg" on the image field/column on the database. Then yo can access them on the view i.e {{ asset('storage/uploads/'.$model->image) }} The image itself will still be stored on your disk or use a third party cloud-host like Amazon to store your images. You can also use regular hosts i.e shared hosts or VPS to host your entire app. You just need to buy enough space if your site will have lots of files.
@the_tech_titan_2.0
@the_tech_titan_2.0 6 жыл бұрын
what is the method for laravel 5.5
@ALEXEIS
@ALEXEIS 6 жыл бұрын
A lot has changed
@Nhung66
@Nhung66 8 жыл бұрын
This is for laravel 5? can you please do this in laravel 5.1 please. Thanks :)
@Devdojo
@Devdojo 8 жыл бұрын
+Nhung Nguyen Sure thing, we'll be creating another one specifically for 5.2 when it is available :) Thanks for the comment. TTYS
@nasirtabassum8924
@nasirtabassum8924 6 жыл бұрын
pic not save in db this is not good way
@adamkurniawan3048
@adamkurniawan3048 7 жыл бұрын
Hi, could we resize it? I think we need install intervention/image if we want to resize our image after uploading? Or does have another way to do that without it?
@calebpacheco
@calebpacheco 8 жыл бұрын
Hey Great video devmojo! How to generate a random name for my images ? public function upload () { if(Input::hasFile('file')){ $file = Input::file('file'); $file->move('uploads', $file->getClientOriginalName()); echo 'Uploaded'; } } *Beginner in programming !
@ronnyereandrade4362
@ronnyereandrade4362 7 жыл бұрын
Boa noite galera muito bom o tutorial mais estou usando o intervention image é esta tudo funcionando, minha duvida e que gostaria de retirar as fotos salvas da pasta public para não ser acessada pela URL alguém saberia como fazer ? Esse e o meu Codigo :: public function update_avatar(Request $request){ // Controle do upload do usuário do avatar if($request->hasFile('avatar')){ $avatar = $request->file('avatar'); $filename = time() . '.' . $avatar->getClientOriginalExtension(); Image::make($avatar)->resize(300, 300)->save( public_path('/uploads/avatars/' . $filename ) ); $user = Auth::user(); $user->avatar = $filename; $user->save(); } return view('profile', array('user' => Auth::user()) ); }/*fim da function para fazer upload de imagens*/
Laravel User Image
20:38
devdojo
Рет қаралды 135 М.
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 203 МЛН
PEDRO PEDRO INSIDEOUT
00:10
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 26 МЛН
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 35 МЛН
SCHOOLBOY. Мама флексит 🫣👩🏻
00:41
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 6 МЛН
laravel, jquery   ajax categories and subcategories, select dropdown
6:04
Arjun Yonjan / Code Travel
Рет қаралды 76 М.
Blazor Web App & Web API in REAL project (.NET 8) - Part 1
27:35
Code Overdose
Рет қаралды 4,4 М.
When RESTful architecture isn't enough...
21:02
Dreams of Code
Рет қаралды 275 М.
The Most Legendary Programmers Of All Time
11:49
Aaron Jack
Рет қаралды 556 М.
Write Laravel, not PHP (feat. Aaron Francis) | 029
58:45
Backend Banter
Рет қаралды 16 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 172 М.
Laravel Forum Package - Chatter
8:33
devdojo
Рет қаралды 52 М.
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 203 МЛН