Wiki articles

Showing 121-140 of 164 items.

Simple revealing and hiding the password in the password field

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

There are numerous usability problems:

5 0
4 followers
Viewed: 29 429 times
Version: 2.0
Category: How-tos

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

Created 8 years ago by softark, updated 6 years ago by softark.

Assume we have many categories and many posts.

5 0
6 followers
Viewed: 86 589 times
Version: 2.0
Category: Tutorials

How to login from different tables in Yii2

Created 5 years ago by AndroideLP, updated 3 years ago by lenovo.

The Problem: Yii2 utilizes by default UserIdentity configured in config/web.php for connection, this object apply one table to authentication ('identityClass' => 'app\panel\models\User'). How to authentication from diferent tables? Solution: Create instances in web.php to uses UserIdentify. eg:

5 0
6 followers
Viewed: 61 430 times
Version: 2.0
Category: How-tos

Nested inline active fields inside Bootstrap horizontal forms

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

Are you using the Bootstrap 3 form styles with Yii 2 Active Forms? Have you faced problems in displaying complex layouts which needs you to display multiple inline form fields in a single row, within bootstrap horizontal forms. Then read on.

5 0
40 followers
Viewed: 57 106 times
Version: 2.0
Category: How-tos

Getting information from the current locale

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

Yii 2.0 comes with a formatter component to format dates, numbers, and other values for international users according to their locale. This is very useful for displaying data. When working with incoming data or when using enhanced input methods like the [MaskedInput widget](https://www.yiiframework.com/doc/api/2.0/yii-widgets-maskedinp...

5 0
2 followers
Viewed: 20 549 times
Version: 2.0
Category: How-tos

How to implement form events

Created 9 years ago by Antonio Ramirez, updated 8 years ago by 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: 37 832 times
Version: 2.0
Category: How-tos
Tags: Forms, How to, yii2

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

Created 9 years ago by Anas AbuDayah, updated 8 years ago by Cozumel.

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

5 0
14 followers
Viewed: 98 514 times
Version: 2.0
Category: Tutorials

UUID instead of an auto-increment integer for ID with Active Record

Created 4 years ago by grigori, updated 3 years ago by samdark.

I have an API. It's built with a RESTful extension over Active Record, and some endpoints provide PUT methods to upload files. By a REST design we create an entity with POST /video first, and then upload a video file with PUT /video/{id}/data.

5 0
4 followers
Viewed: 55 621 times
Version: 2.0
Category: How-tos

Filter & Sort by calculated/related fields in GridView Yii 2.0

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

This wiki explains how to add calculated fields into your Yii Framework 2.0 gridview with filtering and sorting.

13 3
64 followers
Viewed: 248 793 times
Version: 2.0
Category: Tutorials

RBAC Super Simple with Admin and User

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

9 1
15 followers
Viewed: 101 105 times
Version: 2.0
Category: Tutorials

[Guide] How to actually separate Frontend (User) and Backend (Admin) on Yii2 Advanced

Created 8 years ago by Wade Shuler, updated 8 years ago by samdark.

I am writing this guide because I struggled to find a resource that included ALL of the necessary steps to completely separate the frontend from the backend. After reading guides like Configuring different sessions for backend and frontend in yii-advanced-app and [yii2 configuring d...

9 1
18 followers
Viewed: 119 596 times
Version: 2.0
Category: How-tos

Installation guide: Yii-2 advanced template with RBAC system

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

Welcome, all of you !

9 1
19 followers
Viewed: 119 875 times
Version: 2.0
Category: Tutorials
Tags: install, rbac, yii2

Pjax on ActiveForm and GridView - Yii2

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

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

6 0
15 followers
Viewed: 163 345 times
Version: 2.0
Category: How-tos

How to redirect all emails to one inbox on Yii2 applications

Created 3 years ago by Gabriel A. López López.

\yii\mail\BaseMailer::useFileTransport is a great tool. If you activate it, all emails sent trough this mailer will be saved (by default) on @runtime/mail instead of being sent, allowing the devs to inspect thre result.

6 0
4 followers
Viewed: 102 432 times
Version: 2.0
Category: How-tos

Boost composer-asset-plugin update speed

Created 7 years ago by schmunk, updated 7 years ago by samdark.

If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update tasks.

6 0
6 followers
Viewed: 28 220 times
Version: 2.0
Category: Tips

Yii2 Report Grid

Created 6 years ago by Chris Backhouse, updated 6 years ago by Chris Backhouse.

There are some very advanced grids in the Yii2 community, specifically Kartik's amazing gridview extensions but they all designed for interactive screen use.

6 0
7 followers
Viewed: 33 370 times
Version: 2.0
Category: Tips

Pjax GridView: refresh page after delete

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

Normally, after clicking the delete button in gridview, the record will be deleted and the page will refresh, but the page number in query string is lost. This is not always the case we expect.

6 0
4 followers
Viewed: 46 034 times
Version: 2.0
Category: How-tos

Upload files in Yii2 with MongoDb and GridFs

Created 10 years ago by edoardo849, updated 4 years ago by pceuropa.

Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

6 0
6 followers
Viewed: 36 058 times
Version: 2.0
Category: How-tos

How to send emails using SMTP

Created 9 years ago by robregonm, updated 4 years ago by Wade Shuler.
6 0
11 followers
Viewed: 133 917 times
Version: 2.0
Category: How-tos

Yii2: How to create/develop a new extension using Composer locally without version control or Git

Created 7 years ago by Wade Shuler, updated 5 years ago by jwerner.

Using a version control system, like Git, is nice. However, when building an extension from scratch and loading it via Composer, it adds a lot of pain in the butt steps. You have to commit your changes, update composer to pull them over, then notice there is an error, fix, commit, update. repeat.. I don't want all my baby steps under Git. Sure, I could edit my commit history, but c'mon. Just let m...

7 0
6 followers
Viewed: 35 895 times
Version: 2.0
Category: How-tos