#50 LaraBook | User Name with Comments | Comment System with VueJs | Social Network in Laravel
Articles Blog

#50 LaraBook | User Name with Comments | Comment System with VueJs | Social Network in Laravel


okay friends welcome back to Larabook
in this video I will figure out which comment done by which user and which one
way Logan user but first of all I have to
make sure if user in not login then I will hide everything just showing please
login so for that go to your editor open resources view well complete here you
will see something here is your main div and inside this three divs left sidebar
right sidebar and Center and here you will put here oh heck this is check
function to check which user it’s lovely and not here and if but beforehand is I
will put else else to show each one align Center let me say I will say
please login these slogans message will show when user is not logging that’s it
reload just log out and you will see please look inside the main content you
have used already dysfunction let me if okay
this is main next this one is extra just move it because we already have a main
any other no that’s it save it now try to login gödel arabic now main parties we have
to figure out which commander by me which by any other if any other then we
will display username with link of that user profile so for that go to editor
sacraments here is comment box and you are each playing here comment let me
show you what I need to display here is comment change it user ID reload open
comments and you can get user ID who post this cracks let me show you in
detail here you will say lot of book and posts here is array mean array is post
inside this main array we have a three moral a user like comments so we have to
figure out this with simple way here you will say we if we if is view condition
check like it we use in plate if else that’s it
okay we have you will say comment don’t user ID equal to both user ID I am sure
you know but it is this is user ID who is logging and here you will say you
simply you okay now we need else also three else just put your comment okay
comment dot comment here also changes comments close li reload
apartment now you can see is you this is utter comment by any other user this is
why you that’s we indicate help you now for you you will put here and cut back
off link to your port side this base page URL and put profile whole Zion
contact now you will say inside comment it says
your profile and it will show you are logged in is your per file that’s it ok
now what about other we have to display use the name and link to that profile
here is user data we will use this user data data with this post ok and select
with your anchor tag let me show you what is this here you will take profile
and demo it will show demo profile demo person if you can say have the same it
will show the profile that is slug we will add in anchor tag by this area so
for that here you will put a PRF base URL go file and here you will put host
dot user dot name why let me show you save it yeah you will say user I am
getting F name save it go to your browser reload open your comments now
you can see this by demo that’s why it is showing demo here organ you reckon
you and here’s you to comment why Oregon that’s it now it’s not a good any
profiling for that you have to put share this because we need to add a view
variable with plus fine post or user dot slug that’s like you load open command
now you can open demo profile this ad here slash save it reload
open comment now you can open with this link
demo profile that’s it now I need to see this person open it here
is because we are getting everything in this array
slug for URL name for display likes comments everything we can do it with
this combination of array that’s it now you can see all comment by which users
which one which user ok this is three comment to by Oregon
one by you that’s it if I log out it will say please login you can show here
low in form you can redirect to this form is
up to do thank you thank you guys

6 thoughts on “#50 LaraBook | User Name with Comments | Comment System with VueJs | Social Network in Laravel

  1. this is wrong because you can only go to the person who created post but not to those who created comment, if someone commented other than post owner or auth it will go to post owner profile

Leave a Reply

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

Back To Top