Step 1: Initialize the Bootstrap Tooltip & Popover plugins in your view layout file @web\views\layouts\main.php
. Add this to somewhere in the beginning head section (after you have loaded the Jquery using your AppAsset or something similar).
Step 1: Initialize the Bootstrap Tooltip & Popover plugins in your view layout file @web\views\layouts\main.php
. Add this to somewhere in the beginning head section (after you have loaded the Jquery using your AppAsset or something similar).
If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update
tasks.
If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.
In yii2 we can create form without create FormModel. Here we go
We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:
This tutorial is explained following "basic" application structure.
// In Yii 1.x $form = $this->beginWidget('CActiveForm', [
'id' => 'order-search-form',
'method' => 'get',
]);
echo $form->textInput($searchModel, 'id');
echo CHtml::submitButton('Find', ['class' => 'btn btn-primary']);
$this->endWidget();
`
In India have Aadhar number an we may need to valid it a input. So I created a validator for yii2
Hello,
If you want to give extra attention for some specific delete actions and you don't want to override whole yii.confirm JS method here is what you can do:
(I've only put the ActionColumn part of the GridView here to just give you the idea)
It is convenient to use the same identification attribute, say info
, in all of the active records of your application. It should be a virtual read-only attribute defined by a getter method, its label being the model name.
There are a few settings and plugins that can enhance the development experience with Yii in PHPStorm or IntelliJ IDEA. This article explains how to get the most out of your IDE.
So, you have installed a brand new Yii 2 app (basic) or (advanced). Here are a few tips for Apache web server users to get things running more secure and better with your yii2 app.
Sometimes the App needs a nicer look & feel, so its necessary to organize the assets for this and Yii can help a lot to make it easy. In this article I provide tips for handling multiple "Designs". I use these three features:
The definition of breadcrumbs according to its documentation is as follow: Breadcrumbs displays a list of links indicating the position of the current page in the whole site hierarchy.
There are some very advanced grids in the Yii2 community, specifically Kartik's amazing gridview extensions but they all designed for interactive screen use.
The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.
Does your application need to know user's details on browser details, os and device type? We can use PHP's misc. function to achieve that provided you have an update copy of browsercap.ini
Hey Everyone, In this post I Just shared my Experience what most of interviewer ask in YII2 Interview.
I have a calls which help me display json directly in html table.