Wiki articles

Showing 81-100 of 145 items.

Yii2 GridView Sorting and Searching with a Junction Table Column(Many to Many Relationship)

Created 3 years ago by Amjad Khan, updated 3 years ago by Amjad Khan.

Following is the table structure

tblgroups

CREATE TABLE IF NOT EXISTS `tblgroups` (
  `id` int(11) NOT NULL,
  `groupname` varchar(150) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=Acitve,2=Inactive',
  `date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

tblcontacts

2 1
6 followers
Viewed: 54 987 times
Version: 2.0
Category: Tutorials

My Own Components Folder in Yii2

Created 5 years ago by CTala, updated 5 years ago by CTala.

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.

2 1
2 followers
Viewed: 14 999 times
Version: 2.0
Category: Tips

YII2 Pagination Options

Created 4 years ago by VivekYii, updated 4 years ago by VivekYii.

solution here If we are using default pagination option like

1 0
1 follower
Viewed: 12 934 times
Version: 2.0
Category: Tips

`forceCopy` per Asset Bundle

Created 4 years ago by schmunk, updated 4 years ago by schmunk.

During development and depending on your setup you may need to use the options forceCopy or linkAssets of the asset manager to work around possible file-system and permission issues.

1 0
1 follower
Viewed: 8 164 times
Version: 2.0
Category: How-tos

YII2 : simple language Switcher Widget

Created 4 years ago by phunsanit, updated 4 years ago by phunsanit.
  1. create file common\components\languageSwitcher.php
1 0
5 followers
Viewed: 21 908 times
Version: 2.0
Category: Tutorials

Load data from internal/external source to fill form fields

Created 4 years ago by skworden, updated 4 years ago by skworden.

This wiki is to show you how to use jQuery get and JSON to get data from a dropdown/any form field and fill form fields with the values instantaneously. First, I'll give example use cases of what I'm going to teach you so you can quickly see if this is for you.

1 0
5 followers
Viewed: 22 999 times
Version: 2.0
Category: How-tos

Load & Save With Relation

Created 4 years ago by moo.tensai, updated 4 years ago by moo.tensai.

Use this extension : yii2-relation-trait

1 0
2 followers
Viewed: 12 234 times
Version: 2.0
Category: Tips

Language Selector

Created 3 years ago by Programmer Thailand, updated 3 years ago by Programmer Thailand.

common\components\LanguageSelector.php

<?php
namespace common\components;

1 0
5 followers
Viewed: 10 130 times
Version: 2.0
Category: Tutorials

Tunneling using SSH in a limited enviroment

Created 5 years ago by nineinchnick, updated 5 years ago by CeBe.

This tutorial describes how to connect to a remote service via tunnel when only most basic software is available on the remote server. It is not directly related to Yii. It could be hovewer useful for web developers working with shared hosting sites with limited access.

1 0
3 followers
Viewed: 11 250 times
Version: all
Category: Others

How to make bootstrap tabs remain active/selected after navigating to different web pages.

Created 3 years ago by emrald, updated 3 years ago by emrald.

Bootstrap tabs gets unselected/inactive when user navigates to other page and comes back. How to make bootstrap tabs remain active/selected after navigating to different web pages.

1 0
3 followers
Viewed: 9 847 times
Version: 2.0
Category: Tutorials

How to make UrlManager createAbsoluteUrl work with sub-domains

Created 2 years ago by Wade Shuler, updated a year ago by CeBe.

Upon creating my Yii2 Members System, I have ran into a few snags along the way that forced me to extend and bend Yii2 to my will.

1 0
3 followers
Viewed: 22 525 times
Version: 2.0
Category: How-tos

Auto-update denormalized attributes with MongoDb and Yii2

Created 5 years ago by edoardo849, updated 5 years ago by CeBe.

You have different collections in MongoDb with de-normalized attributes. As you may know, due to its not-join nature, MongoDb tends to encourage repetition of the same value in different collections (de-normalization). In this MongoDb is opposed to a more SQL-like approach where you usually reference only the ID of the value with a foreign key.

1 0
3 followers
Viewed: 12 505 times
Version: 2.0
Category: Tips

Editing, Deleting, and Viewing model data with the yii2-detail-view extension

Created 5 years ago by Kartik V, updated 5 years ago by Kartik V.

The yii2-detail-view extension offers you an easy way to EDIT and VIEW your model data, toggle these modes, and adds other features. You can read the extension documentation and/or view a demo of this extension, to understand usage.

1 0
43 followers
Viewed: 67 196 times
Version: 2.0
Category: Tutorials

Using the yii2-datecontrol extension along with yii2-detail-view widget

Created 5 years ago by Kartik V, updated 5 years ago by Kartik V.

The yii2-datecontrol extension allows you to control separate date formats for display and saving for form inputs.

1 0
37 followers
Viewed: 15 220 times
Version: 2.0
Category: How-tos

An alternative way to ElasticSearch

Created a year ago by Necip, updated a year ago by Necip.

This article is for those who have dealt with the complexity of Elasticsearch or any other indexing machines and are looking for an easier way to index the existing database without additional effort.

1 0
2 followers
Viewed: 8 058 times
Version: all
Category: How-tos

How to organize Design "things" in Yii 2 (themes and layout)

Created a year ago by s.oli, updated a year ago by samdark.

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:

1 0
2 followers
Viewed: 13 334 times
Version: 2.0
Category: Tips

embedded javascript block in your view with IDE checking or intellisense

Created 5 years ago by yiqing95, updated 5 years ago by yiqing95.

this is my way for embed js code block in view file:

1 0
3 followers
Viewed: 8 464 times
Version: 2.0
Category: Tips

Events registration examples

Created 8 months ago by minitia, updated 8 months ago by minitia.

Register an event handler at Object-Level

1 0
2 followers
Viewed: 15 982 times
Version: 2.0
Category: How-tos
Tags: events, yii2

Easy way to redirect http:\\localhost\yii2-basic to http:\\localhost\yii2-basic\web\index.php

Created 5 years ago by Scott_Huang, updated 5 years ago by Scott_Huang.

First of all, install yii2 basic template according below link:

1 0
5 followers
Viewed: 32 694 times
Version: 2.0
Category: Tips

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

Created 5 years ago by Kartik V, updated a year ago by alrazi.

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).

2 2
47 followers
Viewed: 52 916 times
Version: 2.0
Category: Tips