We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:
We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:
First of all, install yii2 basic template according below link:
The problem was that all my web applications ran normally on localhost, but on server the Greek characters (or any other no-english characters) displayed with problems.
In Yii1 I used to have my own components under the components folder of the structure, now with namespacing this is a little bit different.
The only differences in Yii 2 is that its much simpler due to available functions in the Model class for loading and validating models.
So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:
By popular demand, today I will be revisiting my previous Yii Framework 2 Getting Started Guide and updating it with what is currently available in the Yii Framework 2 Repository. Provide here is an super simple example CRUD application that will help you get started using the framework.
An example of customizing the Yii GridView is mentioned here. You can easily override Bootstrap or other styling defaults by changing the GridView default options.
One of my sites has been flooded with spam bots and as a result - Gmail gave my mailing domain a bad score and I couldn't send emails to @gmail addresses anymore, not from my email, not from my system, not from any of other domains and websites I host...
Logging is a very important feature of the application. It let's you know what is happening in every moment. By default, Yii2 basic and advanced application have just a \yii\log\FileTarget target configured.
Hey Everyone, In this post I Just shared my Experience what most of interviewer ask in YII2 Interview.
GridView show sum of columns in footer
`PHP
use yii\grid\DataColumn;
Inertia.js is a modern approach to building single-page applications (SPAs) without the complexity of building an API. It allows you to use modern JavaScript frameworks like React, Vue, or Svelte while keeping your Yii2 controllers and routing intact.
1. Create Extension in yii2.
To generate excel by query content, and download through any controller. You also can bind cssClass to header/odd/even rows. As for header, you even can set cssClass for each column.
$this->export2excel($excel_content,$excel_file);
in your controller.
common\components\LanguageSelector.php
<?php
namespace common\components;
We all need SEO friendly URLs for our projects. its not always good to call route with params so we can generalise it for all models using a common function.
Yii2 introduces the BootstrapInterface to ease our application initialization tasks, whether they are composer based or Application bootstrap (do not mistaken with Bootstrap CSS Framework) based tasks. On this article, I am going to explain how to use it on y...