Wiki articles

Showing 61-80 of 166 items.

Building a REST API in Yii2.0

Created 11 years ago by sirin k sirin k, updated 9 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: 156 091 times
Version: 2.0
Category: Tutorials

How to implement form events

Created 11 years ago by Antonio Ramirez Antonio Ramirez, updated 10 years ago by deacs deacs.

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: 44 132 times
Version: 2.0
Category: How-tos
Tags: Forms, How to, yii2

embedded javascript block in your view with IDE checking or intellisense

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

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

2 0
3 followers
Viewed: 16 199 times
Version: 2.0
Category: Tips

MongoDB's RBAC support class extending BaseManager

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

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: 15 705 times
Version: 2.0
Category: How-tos
Tags: mongodb, rbac, yii2

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

Created 11 years ago by raminious raminious, updated 11 years ago by jim. jim..

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)

11 0
22 followers
Viewed: 135 784 times
Version: 2.0
Category: How-tos

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: 104 962 times
Version: 2.0
Category: Tutorials

Create Form With DynamicModel

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

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

4 0
8 followers
Viewed: 52 955 times
Version: 2.0
Category: Tips
Tags: form, model, yii2
0 0
5 followers
Viewed: 50 011 times
Version: 2.0
Category: How-tos

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: 43 226 times
Version: 2.0
Category: Tutorials

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

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

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

1 0
4 followers
Viewed: 81 104 times
Version: 2.0
Category: Tips

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

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

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

1 0
5 followers
Viewed: 88 086 times
Version: 2.0
Category: Tips

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

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

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

3 0
7 followers
Viewed: 49 165 times
Version: 2.0
Category: How-tos

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

Created 11 years ago by Deepak Pradhan Deepak Pradhan, updated 11 years ago by Deepak Pradhan Deepak Pradhan.

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: 11 443 times
Version: 2.0
Category: Tips

RBAC Super Simple with Admin and User

Created 11 years ago by evercode evercode, updated 11 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: 110 057 times
Version: 2.0
Category: Tutorials

Pjax on ActiveForm and GridView - Yii2

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

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

7 0
16 followers
Viewed: 176 863 times
Version: 2.0
Category: How-tos

Moving the vendor directory for multiple projects

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

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

6 0
5 followers
Viewed: 35 055 times
Version: 2.0
Category: How-tos

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: 114 124 times
Version: 2.0
Category: Tutorials

Running applications with Docker

Created 11 years ago by schmunk schmunk, updated 11 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: 54 821 times
Version: 2.0
Category: Tutorials

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

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

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.

9 0
6 followers
Viewed: 38 625 times
Version: 2.0
Category: How-tos

YII2 Pagination Options

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

solution here If we are using default pagination option like

1 0
1 follower
Viewed: 21 764 times
Version: 2.0
Category: Tips