14 Replies to “[2017] Display User || Profile Photo || Social networking Laravel 5.4 Tutorial – Part 3”

  1. Hello sir, do you have tutorials about user authentication/authorisation for the user? I mean when one logs in into the profile but second person cannot change his profile. I have created a CRUD but when I log in with another username I can also edit, or delete the files I inserted.

  2. Hello… I have a problem …during registration i catch error ..“`General error: 1364 Field 'pic' doesn't have a default value

  3. Its my code.
    return User::create([
    'name' => $data['name'],
    'gender' => $data['gender'],
    'slug' => str_slug($data['name'], '-'),
    'email' => $data['email'],
    'picture' => $data['gender'] == 'male' ? 'boy.png' : 'girl.png',
    'password' => bcrypt($data['password']),
    ]);

  4. I'm having a problem uploading an image to my profile, i was able to get it to work for my profile using a different code but as for setting up a default pic for registration it isnt working with my code.
    <img src="{{URL::asset('/image/propic.png')}}" width… height… i didnt specify male
    or female either with registration i found it unnecessary with my site. Xampp,PhpStorm,Laravel 5.4

  5. Hello sir again me .
    my image is not working .
    protected function create(array $data)
    {
    if($data['gender']=='male'){
    $pic_path = 'boy.png';
    }
    else{
    $pic_path = 'girl.png';
    }
    return User::create([
    'name' => $data['name'],
    'pic' => $pic_path,
    'gender' => $data['gender'],
    'slug' => str_slug($data['name'],'-'),
    'email' => $data['email'],
    'password' => bcrypt($data['password']),
    ]);
    }

    i think image path is not working cause when i see my image's location on browser it gives me http://localhost/Larabook/public/img/ this. not male or female's picture location. nvm can u help me?

  6. thank you soo much for your great tutorial bro. i have a question you used csrf_token() for size of the file i think ? when i upload large size photo it show error .so how to increase the size .

  7. The serie is good, but you should avoid doing mistakes during the video record by preparing the parts.
    Congratz 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *