Laravel 5.2 PHP Build a social network - Image Upload

preview_player
Показать описание
Build a complete Social Network Web Application with PHP Laravel. In this video you will see how file upload in Laravel works and how we can use it to store an user image.

In this course we'll build a neat little social network and cover the basics of developing with Laravel.

See you in the videos!
Рекомендации по теме
Комментарии
Автор

You're the best. I don't know English well and do not understand much of you telling, but watching your videos I've got a lot of useful information. Thanks a lot.

kennymaccormick
Автор

Max, you are a great teacher! I was searching the internet for ages for good tutorials. Now I found them ;-) The internet is full of rubbish man. Hope you can give tutorials in Dutch :-P Keep up the good work!

noise-toys
Автор

Hei You!
I Followed all the Laravel Videos, and want to say some things:
Thanks, you are doing a very good job, i will see you at Udemy soon!
I'm Brazilian, so.. your videos have been watched far away =)

I'm a C# programmer, PHP is my hobby, I enjoy it.. Laravel is very great!

wiliam.buzatto
Автор

Hey,

I just wanted to say these videos are FANTASTIC! It made my intro into laravel really easy and since i was re-learning php after 5 years, you helped me re-tweak my memory.

One thing that I've been wanting to ask from the first ep is, what code editing software do you use? I'm currently using ATOM, but your auto implements stuff etc, which would be so useful.

NickMorganOfficial
Автор

Just a heads up for those who failed to display their image, If you created your controller via php artisan then use App\Http\Requests; will most likely be used by default. In my case, I confused use Illuminate\Http\Response; with use App\Http\Response;. So make sure you double check.

rendelllasola
Автор

thank you so much for this awesome course

MeHdi-zgxs
Автор

Splendid tutorial i've ever seen.

samirbanjara
Автор

FYI - I'm using `php -S localhost:8080 -t public/` as my local development web server, and it has an issue with ending a URL as '.jpg'! It only gave a 404. Pounded my head against that problem for a while, until I realized it wasn't even trying to use my 'getUserImage()' method. The php server wasn't using the route! It was trying to locate the literal image file in a nonexistent "userimage" directory. So I passed in the file's base name (in the account view) then appended '.jpg' in the method during the get(). Works like a charm!

MaxWilder
Автор

thanks for your work, and I want to write some note about problem with image(in the end of this video): if after adding url to this class image still doesn`t show you must remove Nginx form settings of your server(only Apachу must be chosen)

jack.olson
Автор

In new laravel version there is no more need in Storage facade. You can just use this construction:
$file = $request->file('image');
$filename = $request->first_name . '-' . $user->id . '.jpg';

if($file)
{
$file->storeAs('images', $filename);
}

stanjockson
Автор

does this method work for mobile photo uploads as well??
Like Lets say that the user uploads a mobile photo that is 5 mb in size and turned 90 degress. would this method compress the image and turn it 90 degrees upright or would one have create a process to do that???

ShahidFoy
Автор

Curious here, since we are naming the file based on the users first name, will the file become lost if the user updates their first name?

Dylan-ohii
Автор

I'm really happy to make the web social networks you teach ..
I want to watch continuation of the video upload images that put them into a database according to its users is not it? but I also don't know how to do

primasaja.comwebsitetutori
Автор

I would like to access the image of the user logged in, in the way that you explained I took the URL of the images of other users. you can help?

ronnyereandrade
Автор

Hey, I've been following your tutorial for about a week now.. all the codes are correct(i guess) as i reviewed it for several times already and its seems correct. updating the name and uploading the image works fine however Im having an error everytime i press the "save account" button - its keeps on showing me this error - "InvalidArgumentException in UrlGenerator.php line 314:
Route [acount] not defined. " - but image and name are updating after refreshing the page. any solution for this? please reply.. Thanks btw for the tutorial! youre great!

mrgamonify
Автор

Thanks again and again))))
I would like to ask two
1.How to work with locales (I have tried but at the end have switched to database system cz it was hard to work with locales can you give an example???)
2. What if we want to have more then one model which should be Authenticalable I mean
how should we handle this???
'model' => App\User::class
Thanks in advance
I wish somehow I can make something for you
!!!

AlbertStepanyan
Автор

Hi Max, the image upload seems to be working fine for me, and i see the file in my file system, when i use the "<img src="{{ route('account.image', ['name' => $user->name . '-' . $user->id . '.jpg']) }}" alt="" class="img-responsive">" code to show the image, the app gets the full path in the view source, but it doesnt render to the screen, do you know what could cause this?

jamie
Автор

Don't you think that using name of the user is quite Dangerous, because he can change his name only, then we will not be able to retrieve his/her image because the name has been changed

sagynbekk
Автор

Hello Max! Thank you for your tutorials, they are very handy! The image upload to me works just the way you showed it in your tutorial, yet there's one thing: If I right click that image (the image loads perfectly on the page) to open in new tab, I get some very weird stuff, just about what Paul explained below. Is that supposed to be like that?

minutecat
Автор

pls do a tutorial how to upload and download a file using laravel, btw subscribed

klipyysc
welcome to shbcf.ru