Questions tagged [yii2-advanced-app]

Yii 2 Advanced Application Template is a skeleton Yii 2 application best for developing complex Web applications with multiple tiers. The template includes three tiers: front end, back end, and console, each of which is a separate Yii application. The template is designed to work in a team development environment. It supports deploying the application in different environments.

##Resources

2222 questions
7
votes
3 answers

How to put custom HTML into Yii2 GridView header?

There's this tag in bootstrap that will automatically shows popup of the abbreviated word. I want to insert this tag to a certain header in the gridview with attribute name act. Here is my code so far. [ …
beginner
  • 2,024
  • 5
  • 43
  • 76
7
votes
3 answers

Yii2 Advanced - Extend View To Add Custom Variable

I am not sure if what I am going for is the best Yii solution to handle this. So I am open to better solutions. Whatever is the most Yii way to do it. I have a left sidebar that only needs to be shown to user's who are logged in. THAT is not the…
Wade
  • 3,757
  • 2
  • 32
  • 51
7
votes
1 answer

Namespaces not working with Codeception (Yii2)

Im using Codeception in Yii2 to make acceptance tests and there's no way to access my models because namespaces are not working into these tests. I have this in my tests/_bootstrap.php require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__…
VictorArcas
  • 630
  • 2
  • 7
  • 23
7
votes
4 answers

Run initial RBAC migrations as part of a regular app migration

I am building a product that is based on the Yii2 advanced template. As part of this product and its future deployments, I am trying to automatically create the tables related to Authorization in a regular Yii2 migration. E.g, when the end user…
Dzhuneyt
  • 8,437
  • 14
  • 64
  • 118
6
votes
1 answer

How to change php.ini in vagrant?

I want to change for every machine on Vagrant (sudo nano /etc/php/7.2/cli/php.ini change for current machine) upload_max_filesize post_max_size max_execution_time Please, help me. P.S. I tried sudo bash -c \'echo export "max_execution_time = 60"…
6
votes
1 answer

Call to undefined function Mpdf\mb_regex_encoding()

i want to make some reports with yii2 Mpdf but when i running the program i got an error like Call to undefined function Mpdf\mb_regex_encoding() please tell me how to solved this program this is my controller public function actionRpt($id) { …
Owl
  • 63
  • 1
  • 3
6
votes
1 answer

How to save multiple values to database from Select2 Widget Yii2

I am using the kartik - yii2-widget-select2 to allow the option to select multiple options while creating in form. I want to enter two or more rows to the database depending on the the number of options selected in the select2 widget. The select2…
user2211486
  • 237
  • 1
  • 6
  • 18
6
votes
3 answers

Default main.php config file for all projects in Yii2

I am developing multiple websites based on Yii2 framework and I was wondering if there is any good way or if it's even good idea or not to create a shared basic config main.php file. The reason behind this is that all my projects are based on same…
labm0nkey
  • 626
  • 1
  • 5
  • 9
6
votes
3 answers

Submitting Button Value to Controller but fail to post the value

I know i have made mistakes here but i have been searching for this for the whole day. I used yii2 framework and i am still new here, I want to access partone/two page, the partone/two page has two submit buttons, one is for adding row, the second…
Robert Limanto
  • 2,068
  • 4
  • 17
  • 27
6
votes
1 answer

How to customize Navbar property in Yii2

I have navigation header like this:
6
votes
1 answer

Class 'Imagine\Gd\Imagine' not found in yii2

I am working on crop image module, I need detail of uploaded image so i am using this function $image = Image::getImagine()->open($path); $size = $image->getSize(); While using this function it is giving me error Class 'Imagine\Gd\Imagine' not…
Nikul
  • 465
  • 1
  • 8
  • 24
6
votes
1 answer

Use built-in rbac or build own?

Following scenario: I have a multi tenant web application in Yii2' advanced template. This application has three portals: - backend - dashboard - frontend Each portal has its own user table for…
Sarah West
  • 2,047
  • 2
  • 20
  • 37
6
votes
4 answers

Yii2: ActiveForm field numeric, length => 8

I'm trying to make yii2 to validate my ActiveForm field that should be numeric and of 8 characters long. Following is what I tried in the default LoginForm model of yii2/advanced/backend, but unfortunately the isNumeric validator simply doesn't kick…
benomatis
  • 5,536
  • 7
  • 36
  • 59
6
votes
2 answers

Yii2 isGuest giving exception in console application

In console application when I used Yii::$app->user->isGuest it is giving the below exception: Exception 'yii\base\UnknownPropertyException' with message 'Getting unknown prop erty: yii\console\Application::user' I even tried adding the user in…
Chinmay Waghmare
  • 5,368
  • 2
  • 43
  • 68
6
votes
1 answer

Multiple Model on same ActiveForm yii2

have multiple model on same form I dont want to save data on both model but i just want to display one variable on view file I have 2 tables Organiser and Event Organiser will log in and Create Event Now there are few fields which are common in…
Mike Ross
  • 2,942
  • 5
  • 49
  • 101