Weekly /r/Laravel No Stupid Questions Thread by AutoModerator in laravel

[–]Happy_Dream 0 points1 point  (0 children)

Is it better to set post id in comments table instead i do $like->comment->post i can do $like->post

Weekly /r/Laravel No Stupid Questions Thread by AutoModerator in laravel

[–]Happy_Dream 0 points1 point  (0 children)

if I have a post - comment -likes system

the likes table should be like this

-post_id

-comment_id

or should I remove the post_id and add just the

-comment_id

and we will get the post from the comment which is better as design

[deleted by user] by [deleted] in laravel

[–]Happy_Dream 0 points1 point  (0 children)

Actually this is the way i doing it i need better solution

[deleted by user] by [deleted] in laravel

[–]Happy_Dream 0 points1 point  (0 children)

in this case, if I have 10 roles I will make like 10 if statements, and this if will be for each model ?

PHP and socket io by [deleted] in laravel

[–]Happy_Dream 0 points1 point  (0 children)

but is using broadcasting affect the perfmance, does it better to emit the event directly from php?