Most voted "yii" questions
Yii is a high-performance PHP framework that utilizes components for the development of large web applications. Allows maximum reuse of codes in Web programming and can significantly accelerate the development process. The name Yii (pronounced i) represents the words easy (easy), efficient (Efficient) and extensible (Extensible).
Learn more…49 questions
Sort by count of
-
8
votes3
answers4784
viewsWhy Laravel instead of Yii?
It’s been a while since I actually developed in PHP. In my last research, about two years ago, I didn’t hear much about the Laravel, as long as the Yii led some rankings (including my) framework to…
-
6
votes1
answer1395
viewsSend email using Cpanel and Phpmailer account
I am trying to send an email using my Cpanel account and the phpmailler class but I am not succeeding , the code I am using is the same as the Phpmailler documentation, how should I proceed? , would…
-
4
votes1
answer53
viewsWith this rule below, how do I show the user’s first and last names in the database?
Example of the name that is in DB: José Alberto da Silva Nogueira. I’d like you to just show José Nogueira. <?php if(!Yii::$app->user->isGuest) echo…
-
3
votes2
answers258
viewsQuestions about Vagrant
I’m learning to work with the Vagrant, I have already created the VirtualMachine, made the provisionings, the project worked perfectly. But when I walk in I see ssh in VirtualMachine to run a script…
-
3
votes2
answers834
viewsGetting data between 3 tables in Yii , cgridview
I am using the Yii framework and I need the information that is in the route table. I’m looking for this information from the vehicle table. There is a third table called equipment In vehicle I have…
yiiasked 10 years, 1 month ago Caique Oliveira 1,143 -
3
votes1
answer157
viewsAdd path to fileField by clicking on image with YII framework
I’m trying to make a scheme with YII framework fileField so that when a user clicks on the image on the screen, the name of the clicked image will appear in span and the model value in fileField…
-
3
votes1
answer90
viewsDisplay data from two grid tables with YII framework
Hello, I’m starting how to develop web and I’m having a problem working with YII framework 1. I have in the application a grid that displays: product name, segment, price. All these data come from…
-
2
votes1
answer943
viewsHow to place *Bootstrap* (`glyphicon-bootstrap`) icons in the Yii framework menu
I am starting a project in the company where I develop, and we are being thank you using the Yii Framework along with the Bootstrap, but I’m not getting the icons of Bootstrap (glyphicon-bootstrap)…
-
2
votes0
answers445
viewsReset connection
Below is the code of my main class <?php // uncomment the following to define a path alias // Yii::setPathOfAlias('local','path/to/local-folder'); // This is the main Web application…
-
2
votes1
answer132
viewsSending php email - Swift_attachment does not work
I’m trying to send an email, but I can’t attach a file. The file is copied to the tmp uploads folder, I have checked and it is there. If I comment on the line that attaches the file, the email is…
-
2
votes1
answer701
viewsAccentuating problems on the most up-to-date server
I have 2 servers with the following settings: Server 1: PHP 5.3.10 Apache 2.2.22 Mysql 5.5.43 Ubuntu 12.04.5 LTS Server 2: PHP 5.6.9 Apache 2.4.7 Mysql 5.5.43 Ubuntu 14.04.2 LTS I’m using the Yii…
-
2
votes1
answer103
viewsSwiftmailer - Corrupted HTML on receiving
I am having problems with Swiftmailer when I send a message and sometimes I get complaints that the content is completely broken (HTML removed). My software sends a lot of emails, and this problem…
-
2
votes0
answers258
viewsPermission problem uploading files
I created a product register that contains a upload imaging. The operation is being done normally, the file goes to the folder determined, and by the system I can even view the image of which I did…
-
2
votes2
answers347
viewsCalling a controller action for views
I’m using Yii2 and doing a website project where one of the features is to list the movies linked to a specific user. I already have a method to associate movies to accounts and one that makes the…
-
1
votes2
answers579
viewsLoading View only (No Layout) - Yii Framework
I’m customizing a website on Yii. And I’m having doubts about how to access a file that’s inside the directory protected/. I’m using a javascript function to load only the view of admin, but I think…
-
1
votes2
answers387
viewsField validation Yiiframework
I am starting in Yii Framework. I have created the following database: Contact Table: code, name, address, city, neighborhood, state; Telephone table: code, phone number, contact. By clicking save,…
-
1
votes2
answers739
viewsHow do I give the user permission to access a page in the Yii framework?
I came across the following error, where in the same says that the user is not allowed to access the page: Error 403 You are not allowed to access this page. Please, someone can help me?…
-
1
votes2
answers1252
views -
1
votes2
answers768
viewsHow to format Yii date?
I need an example of how to change the date to the Brazilian standard.
-
1
votes2
answers327
viewssyntax criteria using Yii framework
I’m having a hard time making a where using criteria, I am posting the code I am making and below the error.. Codigo Criteria $criteria->compare('id',$this->id);…
-
1
votes1
answer51
viewsHow can I compare the attribute?
How can I compare >0 or <0 between these attributes in Yii? [ 'attribute' => 'gross_total', 'header' => 'ENTRADAS' ], [ 'attribute' => 'gross_total', 'header' => 'SAÍDAS' ],…
-
1
votes0
answers140
viewsSearch filtering Yii Start and End Date
How you do a Start Date and End Date search. I’m using the Yii Framework. Can someone help me? I’m not getting the date right.…
-
1
votes1
answer1385
viewsHow to Make URL Friendly
I’m using the Framework Yii and need to create URLs friendly. Example of URL: http://meudominio.com/meuControle/minhaView Which is equivalent to:…
-
1
votes1
answer144
viewsYii2 PHP Framework get value Radiolist
Good would like to know how to get the selected value in the Radiolist of Yii2 Framework: <div class="row"> <div class="col-sm-2"> <?= $form->field($model,…
-
1
votes0
answers113
viewsYii2 error. Unknown Property - Yii base Unknownpropertyexception
Good night, I haven’t been able to use Yii software for several months due to the following error: Unknown Property - Yii base Unknownpropertyexception Getting Unknown Property: app models…
yiiasked 7 years, 7 months ago filipe Silva 11 -
1
votes1
answer259
viewsYii2 - How to include multiple records using activeform and checkbox
Hello, I am using Yii to test some things, I have a table called Order and another table called Productsproedido and this table has the id_order and id_product, I wanted in the same form to include…
-
1
votes0
answers46
viewsYii2 Rest cannot send the field Name of another Table
How do I submit the name of the Employee that is in the Employees table to appear in a request REST? I’m new, he shows up in the view I tested, but I can’t find the right way to send by REST. table…
-
1
votes1
answer259
viewsBootstrap form layout
I am trying to make a form with bootstrap in which will have a title field, a state field, a field for po content, field for tags and a boot. I happen to want to put the title field and the state…
-
0
votes3
answers379
viewsHow to get the value of the user ID in Cgridview - Yii
In place of {{ VALOR DO ID }} I’d like to put the ID of the respective user. Seeing that this is a Row of a Grid. <?php $this->widget('zii.widgets.grid.CGridView', array(…
-
0
votes3
answers306
viewsYii authentication via user module
I’m using the user module Yii code is on this link, only that in my database I also have a client table. Is it possible to use the user module login to authenticate the client or do I have to create…
-
0
votes2
answers130
viewsHow to use the find with sum method?
Using Yii2, I want to get the result of the following consultation: SELECT data_pagamento, sum(valor_pago) FROM tbl_finlegado_titulo_parcela_baixa WHERE MONTH(data_pagamento) = 10 GROUP BY…
-
0
votes1
answer361
viewsConfigure button in Bootstrap
I’m new to Yii and I’m wearing Bootstrap. I set it right but it is strange in the execution of the page, for example I inserted a button, it is inserted normally only in the form of simple link.…
-
0
votes1
answer291
viewsHow to get the contents of another table in Yii?
I’d like to replace the ID, display the employee’s name. <?php $this->widget('zii.widgets.grid.CGridView', array( 'id'=>'documento-grid', 'dataProvider'=>$model->search(),…
yiiasked 10 years, 1 month ago Matheus Azevedo 305 -
0
votes2
answers94
viewsWith this rule below, how do I show the first and last user name in the database?
Inside the model, how do I show the user name: Example of the name that is in DB: José Alberto da Silva Nogueira. I would like you to show only José Nogueira. public function getNome(){…
-
0
votes1
answer491
viewsHow to create access restriction for an action in yii2.0
I need the client user to just view the posts records of my system. I would like to know how to restrict the actions on the screen for the client user, so that this user can only view the records,…
-
0
votes1
answer75
viewsHow does the dropdownlist work?
My code is just to add text, I am using framework Yii 1, I would like to create a dropdownlist with female and male only options. <div class="row"> <?php echo…
-
0
votes1
answer602
viewsButton event in Yii Framework
I am making an application with Yii Framework that is relatively simple. First I made a view called total.php, who asks for a data inicial, data final and a button: <?php $form =…
-
0
votes1
answer155
viewsWhere part of Yii2 I connect to the database
In the Yii2 Framework application I’m using the "Advanced" template, I’m having difficulty making the connection. Where the framework is connected to the mysql database?
-
0
votes0
answers450
viewstake time to generate a pdf with mPDF Kartik for Yii2
I am generating a pdf with 41 and this taking about 3 minutes, would be able to generate this file faster? follows the code: $pdf = new Pdf([ // set to use core fonts only 'mode' =>…
-
0
votes2
answers262
viewsInserting multiple templates in a Yii2 form
Hello Everyone I am starting in yii2, and I have a question I am making a form in which I insert two different models in a single form, but I am not able to perform create: Follow the code I made:…
-
0
votes1
answer413
viewsYii2 framework Multi input in the same form
I’m using the widget https://github.com/unclead/yii2-multiple-input along with yii2 and I’m having an error at commit time. My scenario is this: In my "catalogs" form the user can when creating the…
-
0
votes1
answer49
viewsAction update widget dynamicform not saved in Yii 2.0 database
Hello Folks I can a registration form, which has a main table po, and a secondary table po_item to save multiple records, but in the update action the form does not back the records of the database…
-
0
votes1
answer207
viewsYii2 textinput() and httml::submitButton in the same row
I need an example in Yii2 that allows me to put some submitButton and textinput() in the same line, as the example below: part of my code that mounts the buttons : <?=…
-
0
votes1
answer199
viewsUpdate with two Yii2 models
I am studying about Yii2 and do not have much knowledge of the framework. I’m having difficulty updating data in the database that are in two different models (Student and Address). The idea is…
-
0
votes0
answers26
views -
0
votes1
answer24
viewsHow to save data from a Carraydataprovider in the Database?
Hello, I have a Carraydataprovider and wanted to save your data in a table through a model, I have tried several ways and did not get result, which would be the best way to save it? My last attempt…
-
0
votes0
answers53
viewsHow to store </br> and n in the database, and then show in HTML when it is called?
I’m storing it in the attribute off_desc the description of an offer, but even if in Textarea I insert line breaks, in the database and in HTML (When I try to collect the data), they are all shown…
-
0
votes0
answers57
viewsTag manager jquery tag tag
since a while ago, my tag manager, in Yii framework, is generating tags with a "tag separator?" instead of a comma, which can be? Code: $('.tm-input').tagsManager({ prefilled: ["<?php echo…
-
0
votes0
answers26
viewsHow to reply to the recipient when receiving the email
<div class="site-contact"> <h1><?= Html::encode($this->title) ?></h1> <?php if (Yii::$app->session->hasFlash('contactFormSubmitted')): ?> <div class="alert…