Wiki articles in category Tutorials

Showing 21-40 of 267 items.

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

Created 9 years ago by softark softark, updated 7 years ago by softark softark.

Assume we have many categories and many posts.

5 0
6 followers
Viewed: 91 385 times
Version: 2.0
Category: Tutorials

Language Selector

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

common\components\LanguageSelector.php

<?php
namespace common\components;

2 0
6 followers
Viewed: 18 992 times
Version: 2.0
Category: Tutorials

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 10 years ago by softark softark, updated 6 years ago by samdark samdark.

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.

11 0
6 followers
Viewed: 63 533 times
Version: 2.0
Category: Tutorials

A simple widget - jump2link

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

namespace app\components;

0 0
1 follower
Viewed: 15 397 times
Version: 2.0
Category: Tutorials

Simple Jui Autocomplete in yii2

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

To use jui auto complete widget first add

0 0
3 followers
Viewed: 54 491 times
Version: 2.0
Category: Tutorials

YII2: Create console commands inside a module or extension

Created 10 years ago by MetaCrawler MetaCrawler, updated 7 years ago by Luis Armando 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.

8 0
6 followers
Viewed: 70 926 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 10 years ago by Scott_Huang Scott_Huang, updated 10 years ago by Scott_Huang 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: 28 203 times
Version: 2.0
Category: Tutorials

YII2 : simple language Switcher Widget

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

Simple way to implement Dynamic Tabular Inputs

Created 10 years ago by ezekielnoob ezekielnoob, updated 6 years ago by samdark samdark.

grid

5 0
10 followers
Viewed: 88 012 times
Version: 2.0
Category: Tutorials

Active Record snapshotting (Model data base history)

Created 10 years ago by Bizley Bizley, updated 10 years ago by Bizley Bizley.

One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.

1 0
5 followers
Viewed: 18 515 times
Version: 1.1
Category: Tutorials

Running applications with Docker

Created 10 years ago by schmunk schmunk, updated 10 years ago by schmunk 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: 53 731 times
Version: 2.0
Category: Tutorials

Drills : Search by a HAS_MANY relation in Yii 2.0

Created 11 years ago by softark softark, updated 7 years ago by softark softark.

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

13 0
14 followers
Viewed: 111 624 times
Version: 2.0
Category: Tutorials

Gettext and Poedit HOWTO

Created 11 years ago by Maug Lee Maug Lee, updated 11 years ago by Maug Lee Maug Lee.

Example settings when using Gettext for i18n.

0 0
2 followers
Viewed: 14 879 times
Version: 1.1
Category: Tutorials

RBAC Super Simple with Admin and User

Created 11 years ago by evercode evercode, updated 10 years ago by evercode 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...

9 1
15 followers
Viewed: 107 112 times
Version: 2.0
Category: Tutorials

Simple Way to Upload and Save File

Created 11 years ago by Misbahul D Munir Misbahul D Munir, updated 11 years ago by Misbahul D Munir Misbahul D Munir.

This tutorial need extension mdmsoft/yii2-upload-file. Follow the intruction to install. After installation done, create controller and action

0 0
4 followers
Viewed: 42 123 times
Version: 2.0
Category: Tutorials

How to use imagine ( crop, thumb, effects for images ) on Yii2

Created 11 years ago by Anas AbuDayah Anas AbuDayah, updated 10 years ago by Cozumel Cozumel.

Imagine adds most common image functions and also acts as a wrapper to Imagine image manipulation library.

5 0
14 followers
Viewed: 103 410 times
Version: 2.0
Category: Tutorials

How to display images in CJuiAutoComplete without extenstions

Created 11 years ago by Asmaa Asmaa, updated 6 years ago by samdark samdark.

I wanted to customize the CJuiAutoComplete, so that it displays a thumb image before the label like the one shown in the following image:

0 0
2 followers
Viewed: 15 172 times
Version: 1.1
Category: Tutorials

Building a REST API in Yii2.0

Created 11 years ago by sirin k sirin k, updated 8 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.

This is wiki page is useful if you are trying to build a customized REST API in Yii2.0

4 0
16 followers
Viewed: 154 470 times
Version: 2.0
Category: Tutorials

Translation from .txt file

Created 11 years ago by Yii3 Yii3, updated 11 years ago by Yii3 Yii3.

Translation from .txt file Note:

0 2
4 followers
Viewed: 11 664 times
Version: 1.1
Category: Tutorials

How to display Dependent drop-down value using ajax call with dynamically

Created 11 years ago by Ankit Modi Ankit Modi, updated 6 years ago by samdark samdark.

Hi Friends, In this tutorial I write a code display dependent drop-down value using ajax call.

1 1
6 followers
Viewed: 52 950 times
Version: 1.1
Category: Tutorials