Wiki articles in category Tutorials

Showing 1-20 of 37 items.

Nested Set with Yii2

Created 2 months ago by sangprabo, updated a month ago by sangprabo.

The nested set behaviour is an approach to store hierarchical data in relational databases. For example, if we have many categories for our product or items. One category can be a "parent" for other categories, means that one category consists of more than one category. The model can be drawn using a "tree" model. There are other approaches available but what we will learn in this article is speci...

3 0
2 followers
Viewed: 2 103 times
Version: 2.0
Category: Tutorials

Batch Gridview data ajax send splitted in chunks displaying bootstrap Progress bar

Created 6 months ago by toaster, updated 6 months ago by toaster.

The scenario in which this wiki can be useful is when you have to send an (huge) array of model ids and perform a time consuming computation with it like linking every model to other models. The idea is to split the array into smaller arrays and perform sequential ajax requests, showing the calculation progress using a [Bootstrap Progress bar](https://www.yiiframework.com/extension/yiisoft/yii2-bo...

7 0
2 followers
Viewed: 9 109 times
Version: 2.0
Category: Tutorials

Yii2 RESTful API with OAuth 2.0

Created a year ago by sirin k, updated 6 months ago by sirin k.

https://cdn.pbrd.co/images/GMN5ROs.jpg

3 0
3 followers
Viewed: 35 822 times
Version: 2.0
Category: Tutorials

Working with relational removals by yii2

Created 2 years ago by AndroideLP, updated a year ago by Jairus Martin.

This tutorial shows you how to safely remove records between relationships.

0 0
2 followers
Viewed: 19 348 times
Version: 2.0
Category: Tutorials

Optimize Scenarios for yii2

Created 2 years ago by AndroideLP, updated a year ago by AndroideLP.

Working with scenarios, with models that can receive many modifications in their rules or structures as development evolves, can create disruptions in the rescue process.

3 0
2 followers
Viewed: 21 621 times
Version: 2.0
Category: Tutorials

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

Created 2 years ago by Amjad Khan, updated 2 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 0
6 followers
Viewed: 49 293 times
Version: 2.0
Category: Tutorials

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

Created 2 years ago by emrald, updated 2 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 070 times
Version: 2.0
Category: Tutorials

Installation guide: Yii-2 advanced template with RBAC system

Created 2 years ago by Sherin Jose, updated 2 years ago by Sherin Jose.

Welcome, all of you !

7 1
19 followers
Viewed: 79 992 times
Version: 2.0
Category: Tutorials
Tags: install, rbac, yii2

How to create/update a model with its related items using Listbox or CheckboxList

Created 3 years ago by softark, updated a year ago by softark.

Assume we have many categories and many posts.

3 0
6 followers
Viewed: 28 622 times
Version: 2.0
Category: Tutorials

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: 9 524 times
Version: 2.0
Category: Tutorials

Relational Query - Lazy Loadnig and Eager Loading in Yii 2.0

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

It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's very important to know how the Eager Loading approach works in Yii 2. It has changed drastically from that of Yii 1.1, and there are common misunderstandings about it in the community.

4 0
4 followers
Viewed: 28 995 times
Version: 2.0
Category: Tutorials

A simple widget - jump2link

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

namespace app\components;

0 0
1 follower
Viewed: 8 756 times
Version: 2.0
Category: Tutorials

Simple Jui Autocomplete in yii2

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

To use jui auto complete widget first add

0 0
3 followers
Viewed: 31 351 times
Version: 2.0
Category: Tutorials

YII2: Create console commands inside a module or extension

Created 3 years ago by MetaCrawler, updated 10 months ago by Luis Armando.

Here is a small guide how to get console commands running inside modules & extensions. For this guide I used a fresh yii2 basic application template.

7 0
6 followers
Viewed: 33 810 times
Version: 2.0
Category: Tutorials

Export query content to excel through any of your controllers, also can set cssClass for header/odd/even rows, auto download

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

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.

2 0
2 followers
Viewed: 14 800 times
Version: 2.0
Category: Tutorials

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: 20 516 times
Version: 2.0
Category: Tutorials

Simple way to implement Dynamic Tabular Inputs

Created 4 years ago by ezekielnoob, updated 4 months ago by samdark.

grid

2 0
11 followers
Viewed: 29 031 times
Version: 2.0
Category: Tutorials

Running applications with Docker

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

When building PHP web applications you usually have to take care about defining and providing a consistent development and production environment for your team. This includes your application packages, PHP-extensions, database servers and often further components such as a mail server or workers.

4 0
8 followers
Viewed: 32 044 times
Version: 2.0
Category: Tutorials

Drills : Search by a HAS_MANY relation in Yii 2.0

Created 4 years ago by softark, updated 7 months ago by softark.

This article tries to describe the practical techniques of searching by a HAS_MANY relation using ActiveRecord of Yii 2.0.

11 0
12 followers
Viewed: 73 011 times
Version: 2.0
Category: Tutorials

RBAC Super Simple with Admin and User

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

One of the common requests I see in the forum is how to implement RBAC. While you can implement Yii 2's built-in RBAC, that might be too much for developers who are just starting with Yii 2 or have simpler needs. Sometimes you are looking for a fast solution and just want two flavors, user and admin. And even if you will eventually need more, you can use these methods as a starting point for devel...

6 1
14 followers
Viewed: 76 671 times
Version: 2.0
Category: Tutorials