Questions tagged as 'yii2'

2
answers

Help I have problem with a div

Good day, I am forced to request your help, I consult you I have a form that I have the following <?= $form->field($model, 'cd_categoria',['labelOptions'=>['style'=>'color:black']])->dropdownList($model->getListaCategor...
asked by 14.03.2018 / 18:29
1
answer

Problem connecting Yii2 with SQL Server

I'm trying to connect my Yii2 application with a database in SQL Server, the version I'm using is 10.0, this is my error message:    exception 'PDOException' with message 'SQLSTATE [08001]: [Microsoft] [ODBC Driver 11 for SQL Server] Named Pi...
asked by 01.03.2018 / 03:10
0
answers

Install SQLite extension in Yii2

Good day I am trying to connect my application in Yii2 with a database in SQLite but I present this error: The configuration for the "db" component must contain a "class" element. This is my configuration file return ['components' => [...
asked by 23.02.2018 / 19:28
1
answer

Connect Yii2 with database in SQLite

I'm trying to connect my application in Yii2 with a BD in Yii2 so far this is the configuration I have in my .db file return [ 'class' => 'yii\db\Connection', 'dsn' => 'sqlite:' . __DIR__ .'/../../softwareoperac...
asked by 23.02.2018 / 06:27
1
answer

Error in Yii2 Model Generator: Table does not exist

I want to see if anyone knows how to fix the error. It says that the table does not exist but I do have it in the database Here is the table in the database     
asked by 17.02.2018 / 00:50
1
answer

Problems showing image in the brandLabel of NavBar in Yii2

Well, something strange happens to me when I want to show images in the NavBar of the main menu, which is in the layout folder of the views Initially I was using the basic template of Yii2, but then I realize that I needed to use frontend and...
asked by 07.02.2018 / 23:15
0
answers

Yii2: Compare an input that only enter dates with a specific format

How can I get an input in a date and if the date is not similar to this format aa-mm-yyyy do not accept it? All that within a function "rules". I am using the following php code for the aa-mm-yyyy format but I have no idea how to continue '...
asked by 30.01.2018 / 16:44
1
answer

Yii2 php, help in the model

Good morning, I have the column, of code and in yii if one puts 0 after the name of the other table pulls the information ... but I can not do the search, which I have programmed in the model ?? use yii\helpers\Url; return [ [ 'class'...
asked by 08.01.2018 / 16:52
3
answers

My Yii2 application does not work well when I upload it to the server

It happens that when I uploaded my Yii2 application to the server, it only opens the home page, when I want to access the other pages, it shows me an error that the requested page does not exist I use friendly URLs, which work well on localho...
asked by 13.12.2017 / 16:35
1
answer

Validate that a field in yii 2 does not allow writing special characters like,. / - "

I want to validate the following in the crud generated by yii 2: - that the user can not write a specific special character such as; or as " He tried to implement it using JavaScript but he does not allow me and in addition to this I have anothe...
asked by 13.10.2017 / 04:48