Wiki articles

Showing 61-80 of 149 items.
Created 3 years ago by VivekYii, updated 3 years ago by VivekYii.

YII2 Pagination Options

solution here If we are using default pagination option like

1 0
1 follower
Viewed: 11 356 times
Version: 2.0
Category: Tips
Created 3 years ago by robregonm, updated 3 years ago by robregonm.

Use minified version of JqueryAsset, BootstrapAsset (and all default assets)

By default, Yii 2.0 chooses to use the non-minified version of Jquery and Bootstrap files (CSS and JS). However, there's a simple way to indicate Yii to use the minified version.

5 0
5 followers
Viewed: 21 103 times
Version: 2.0
Category: How-tos
Created 3 years ago by schmunk, updated 3 years ago by schmunk.

Running applications with Docker

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: 30 398 times
Version: 2.0
Category: Tutorials
Created 3 years ago by softark, updated 2 months ago by softark.

Drills : Search by a HAS_MANY relation in Yii 2.0

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: 68 417 times
Version: 2.0
Category: Tutorials
Created 4 years ago by mariosimaremare, updated 4 years ago by mariosimaremare.

Moving the vendor directory for multiple projects

This How-To is useful if you are planning to move the Yii vendor directory outside the default location.

4 0
4 followers
Viewed: 18 578 times
Version: 2.0
Category: How-tos
Created 4 years ago by Sreenadh, updated 4 years ago by Sreenadh.

Pjax on ActiveForm and GridView - Yii2

Here is a example on how to use Pjax with GridView (yii\grid\GridView) and ActiveForm (yii\widgets\ActiveForm) widgets in Yii2.

5 0
13 followers
Viewed: 111 468 times
Version: 2.0
Category: How-tos
Created 4 years ago by evercode, updated 3 years ago by evercode.

RBAC Super Simple with Admin and User

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: 73 161 times
Version: 2.0
Category: Tutorials
Created 4 years ago by Deepak Pradhan, updated 4 years ago by Deepak Pradhan.

Analyse the server's USER-AGENT against browsecap file to determine it's capability.

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

0 0
0 follower
Viewed: 4 767 times
Version: 2.0
Category: Tips
Created 4 years ago by hrnair, updated 4 years ago by hrnair.

Yii2: Configuring different sessions for backend and frontend in Yii Advanced Application Template

This is as an extension of this wiki by Kartik V which shows to make different enableAutoLogin cookies for frontend and backend.

2 0
7 followers
Viewed: 30 897 times
Version: 2.0
Category: How-tos
Created 4 years ago by Scott_Huang, updated 4 years ago by Scott_Huang.

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

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

1 0
5 followers
Viewed: 25 535 times
Version: 2.0
Category: Tips
Created 4 years ago by Scott_Huang, updated 4 years ago by Scott_Huang.

Step by step for how to full export Yii2 grid to excel

We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:

0 0
5 followers
Viewed: 50 590 times
Version: 2.0
Category: Tips
Created 4 years ago by Misbahul D Munir, updated 4 years ago by Misbahul D Munir.

Simple Way to Upload and Save File

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: 26 648 times
Version: 2.0
Category: Tutorials
0 0
5 followers
Viewed: 33 100 times
Version: 2.0
Category: How-tos
Created 4 years ago by Misbahul D Munir, updated 4 years ago by Misbahul D Munir.

Create Form With DynamicModel

In yii2 we can create form without create FormModel. Here we go

2 0
7 followers
Viewed: 27 821 times
Version: 2.0
Category: Tips
Tags: form, model, yii2
Created 4 years ago by Anas AbuDayah, updated 2 years ago by Cozumel.

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

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

5 0
13 followers
Viewed: 68 790 times
Version: 2.0
Category: Tutorials
Created 4 years ago by Asmaa, updated 4 years ago by Asmaa.

How to display images in CJuiAutoComplete without extenstions

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
1 follower
Viewed: 7 450 times
Version: all
Category: Tutorials
Created 4 years ago by raminious, updated 3 years ago by jim..

How to hide /frontend/web in url addresses on apache

There is an issue on Yii2 to redirecting / urls to /frontend/web.
In other words we need a way to hidden /frontend/web from addresses.
We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

7 0
18 followers
Viewed: 96 540 times
Version: 2.0
Category: How-tos
Created 4 years ago by edoardo849, updated 4 years ago by edoardo849.

MongoDB's RBAC support class extending BaseManager

Here's a possible implementation for MongoDb of the RBAC standard. Create a class "MongoDbManager" in `common\components and modify your params.php` file like this:

0 0
4 followers
Viewed: 8 740 times
Version: 2.0
Category: How-tos
Tags: mongodb, rbac, yii2
Created 4 years ago by yiqing95, updated 4 years ago by yiqing95.

embedded javascript block in your view with IDE checking or intellisense

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

1 0
3 followers
Viewed: 7 421 times
Version: 2.0
Category: Tips
Created 4 years ago by Antonio Ramirez, updated 3 years ago by deacs.

How to implement form events

You have that, when a product is on development they can change its API anytime. This change is quite important though, its related on how to set the events of your form, for example, the useful beforeSubmit.

5 0
6 followers
Viewed: 23 937 times
Version: 2.0
Category: How-tos
Tags: Forms, How to, yii2