Wiki articles

Showing 21-40 of 145 items.

Yii2 Report Grid

Created 2 years ago by Chris Backhouse, updated a year 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: 22 355 times
Version: 2.0
Category: Tips

Pjax GridView: refresh page after delete

Created a year ago by hehbhehb, updated a year 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
3 followers
Viewed: 16 317 times
Version: 2.0
Category: How-tos

Upload files in Yii2 with MongoDb and GridFs

Created 5 years ago by edoardo849, updated 4 years ago by skworden.

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
5 followers
Viewed: 23 792 times
Version: 2.0
Category: How-tos

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

Created 5 years ago by Kartik V, updated 7 months ago by softark.

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

12 2
64 followers
Viewed: 197 617 times
Version: 2.0
Category: Tutorials

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

Created 4 years ago by robregonm, updated 4 years ago by 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.

5 0
5 followers
Viewed: 23 796 times
Version: 2.0
Category: How-tos

How to login from different tables in Yii2

Created a year ago by AndroideLP, updated 8 days ago by AndroideLP.

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

5 0
5 followers
Viewed: 22 965 times
Version: 2.0
Category: How-tos

How to send emails using SMTP

Created 5 years ago by robregonm, updated 6 months ago by Wade Shuler.
5 0
10 followers
Viewed: 94 231 times
Version: 2.0
Category: How-tos

Nested inline active fields inside Bootstrap horizontal forms

Created 5 years ago by Kartik V, updated 5 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: 48 094 times
Version: 2.0
Category: How-tos

Getting information from the current locale

Created a year ago by CeBe, updated a year 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: 10 146 times
Version: 2.0
Category: How-tos

How to implement form events

Created 5 years ago by Antonio Ramirez, updated 3 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: 26 801 times
Version: 2.0
Category: How-tos
Tags: Forms, How to, yii2

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

Created 5 years ago by Anas AbuDayah, updated 3 years ago by Cozumel.

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

5 0
13 followers
Viewed: 75 312 times
Version: 2.0
Category: Tutorials

Nested Set with Yii2

Created 6 months ago by sangprabo, updated 6 months 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...

5 0
3 followers
Viewed: 6 436 times
Version: 2.0
Category: Tutorials

Installation guide: Yii-2 advanced template with RBAC system

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

Welcome, all of you !

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

Moving the vendor directory for multiple projects

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

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

4 0
4 followers
Viewed: 21 099 times
Version: 2.0
Category: How-tos

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: 33 699 times
Version: 2.0
Category: Tutorials

Single PHP entry point with Nginx

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

In this article I will show you how to slightly increase application security, by exploiting the fact that Yii implements the Front Controller Pattern.

4 0
3 followers
Viewed: 10 212 times
Version: all
Category: How-tos

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 3 years ago by softark, updated 3 months ago by 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.

4 0
5 followers
Viewed: 31 761 times
Version: 2.0
Category: Tutorials

Optimize Scenarios for yii2

Created 2 years ago by AndroideLP, updated 8 days 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.

4 0
2 followers
Viewed: 23 614 times
Version: 2.0
Category: Tutorials

Relational data fields display and edit with the yii2-detail-view extension

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

If you have read this wiki you would be aware of the yii2-detail-view extension and how it offers you an easy way to EDIT and VIEW your model data, toggle these modes, and other features. You can [read the extension documentation](http://demos....

4 0
41 followers
Viewed: 51 791 times
Version: 2.0
Category: Tutorials

Building a REST API in Yii2.0

Created 5 years ago by sirin k, updated 2 years ago by 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: 127 031 times
Version: 2.0
Category: Tutorials