Skip to content
Advertisement

Tag: yii2

Set reason for thrown bad request in Yii 2

I’m writing an API and I have to throw HTTP 400 bad request like below and it works fine meaning that it displays the default HTTP 400 page (I have no views defined because I’m building an API) What I would like to achieve is to give some reason for the bad request error thrown so that who is using

Getting unknown property Exception in yii2

here I have a model in yii2 when I want to submit the form I face with this error. Getting unknown property: appmodelsCarAd::used_value but as you see I have this field in my fields. My table name is car_ad. what is the problem with my code? Answer Because this field is not present in the @property comment I guess you

Yii : How to add datepicker in order to filter gridview

Here is my codes in order to show some relation tables data in the controller and it is view code I want to add a date picker to view and use it in order to filter GridView I am new in yii2 please advise me Answer first of all install any datepicker widget i.e 2amigos date picker in your index

Advertisement