Answer the question
In order to leave comments, you need to log in
How to add required to a form?
{!! Former::tel('phone_number', null)
->placeholder('8 7xx xxx xxxx')
->value($orderData['phone'])
->addClass('tel--control phone-mask')
->label(__('messages.Телефон'))
->tabindex(2)
!!}
Answer the question
In order to leave comments, you need to log in
Table Post type rating (post_id, user_id).
Table Rating of comments of the type (comment_id, user_id).
Table of comments of the form (post_id, comment_id).
In order not to count the rating from zero for each request, an elementary thing is done: in the Posts table, create an additional Rating field. And every time someone puts a plus (or minus), in addition to adding (or deleting) an entry to the Post Rating table, you also increase (or decrease) the Rating field in the Posts table. Similarly, start the same Rating field in the comments table and for each plus / minus comment, in addition to adding it to the Comments Rating table, increase (decrease) the rating counter-field in the Comments table itself
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question