RobHowdle's avatar

User Profile Pages

Hi all, so I'm pretty new here and attempted to do my own research because I asked here but didn't find anything that fitted. I'm using Laravel 7.6.2 and I'm wanting to create some user profiles for my users and a user dashboard. I was wondering if anybody knew of any lessons/ tutorials? The ones that I found were either extremely difficult to follow and assumed you had a really good knowledge of Laravel to begin with which I don't yet but also they were for versions 5.7 and 6, I didn't see anything from 7.

I did look at what's changed is version 7 and it would see quite a lot has, not knowing exactly what and how it would affect any projects I do though. If anyone could point me in the right directions I'd appriciate it :)

Thanks Rob

0 likes
3 replies
RobHowdle's avatar

Thanks for the reply, that tutorial seems to be about creating users, not user profiles? User profiles are pages that lists all of the user data and is onyl accessable by the user, Laravel already has registration and login built into it however I can't see to get User Profile Pages which was my original question.

Thanks

KalimeroMK's avatar

my bed miss understand you just need to add user_id column in post table for example and in the model to create

public function PostList()
    {
        return $this->belongsTo(Post::class, 'id', 'user_id')->orderBy('updated_at', 'desc');
    }

to list all post from the corrent user

and in foreach list all post

@foreach($user->PostList()->get())

@endforeach

Please or to participate in this conversation.