PHP Yii2 REST POST / Missing required parameters
Thank you very much for your help. I am using Yii2. I want to use a REST POST request to send a list of words to the server, the server will translate the words and send back their translation. When…
Thank you very much for your help. I am using Yii2. I want to use a REST POST request to send a list of words to the server, the server will translate the words and send back their translation. When…
I would like to use my class rootfolder/assets/AppAsset.php from my backend class rootfolder/backend/views/layouts/view.php however I can't seem to reference it. I cannot do assetsAppAsset, ....assetsAppAssets Is there a way I can use this class that is inside the root folder…
I am trying to plot a chart via highchart in yii2. I have already installed it and set it. Below is my code in my index.php view <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> function loadChartData() { $.ajax({ url: '$url_chart', method: 'GET', dataType:…
I have this problem in most of my yii2 projects. I got this error: copy(/var/www/vhosts/gunungkombengtetapselalujaya.com/httpdocs/frontend/web/assets/56687de2/yii.activeForm.js): failed to open stream: Success I have contacted my hosting provider but they didn't give me any solutions at all so I'm at lost. I…
I have controller public function actionIndex() { $rows = Players::find()->all(); return $this->render('index', [ 'rows' => $rows ]); } and view <h1><?=$listPlayer -> name?></h1> Error = Undefined variable '$listPlayer' I re-read all the documentation and all the guides on the Internet…
I'd like to be able to load up a frontend controller action from a default URL eg. www.mywebsite.com and have it load up the frontend siteController::actionMain(). Is there any changes I can make in my Yii2 project to acheive this?…
I have a db table with fields like this posts table 'id' 'group_id' 'name' I display this table as a list in kartik Select2 widget $form->field($model, 'post') ->widget( kartikselect2Select2::className(), [ 'data' => ArrayHelper::map(Post::find()->all(), 'id', 'name'), 'options' => [ 'placeholder' =>…
i run few commands : yii migrate and $ yii migrate/data templatedata $ php yii migration/data templatedata but all of the command that i run return the value : bash: yii: command not found // i am a beginner in…
So basically I have been searching for a lot of time a way to fix this... It does not make my application block or something else bad, but I want to fix, in order to make the application smoother and/or…
I'm trying to create a migration that changes the records I need in a table $sql = ''; $sql .= "UPDATE card_series SET Code = 903 WHERE ID = 1600;"; $cardsSeries1600 = CardList::find() ->where(['seriesId' => 1600]) ->orderBy('ID') ->all(); $cardNum =…