Wiki articles

Showing 101-120 of 142 items.

Yii 2 list of path aliases available with default basic and advanced app.

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

If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

10 3
47 followers
Viewed: 134 634 times
Version: 2.0
Category: Tips

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: 20 458 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: 32 642 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: 9 890 times
Version: all
Category: How-tos

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 3 years ago by softark, updated 27 days 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: 30 051 times
Version: 2.0
Category: Tutorials

Optimize Scenarios for yii2

Created 2 years ago by AndroideLP, updated a year 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: 22 267 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 148 times
Version: 2.0
Category: Tutorials

Building a REST API in Yii2.0

Created 4 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: 125 632 times
Version: 2.0
Category: Tutorials

Nested Set with Yii2

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

4 0
3 followers
Viewed: 3 777 times
Version: 2.0
Category: Tutorials

Integrating ZF2 into Yii - use case demonstrated

Created 6 years ago by Boaz, updated 5 years ago by Boaz.

I needed to use a class from ZF2 in my Yii project. I've read probably all there is about this subject and still I needed lots of trial & errors to get it working, probably due to my lack of experience working with namepsaces and ZF2 in general. Also, the resources on the web are all partial, at best. Most simply refer to ZF1 where things are technically different. When I got it all working I de...

4 0
6 followers
Viewed: 10 128 times
Version: 2.0
Category: How-tos

Installation guide: Yii-2 advanced template with RBAC system

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

Welcome, all of you !

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

Using multiple models in an identity

Created 9 months ago by samdark, updated 5 months ago by samdark.

Let's assume we have two models: Customer and Supplier and we want both to log in. Yii is quite flexible when it comes to authentication and authorization so it's possible.

8 1
2 followers
Viewed: 15 623 times
Version: 2.0
Category: How-tos

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 121 times
Version: 2.0
Category: How-tos

How to login from different tables in Yii2

Created a year ago by AndroideLP, updated a year ago by samdark.

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: 21 082 times
Version: 2.0
Category: How-tos

Pjax GridView: refresh page after delete

Created a year ago by hehbhehb, updated 11 months 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.

5 0
3 followers
Viewed: 14 445 times
Version: 2.0
Category: How-tos

How to send emails using SMTP

Created 5 years ago by robregonm, updated 3 months ago by Wade Shuler.
5 0
10 followers
Viewed: 90 843 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: 47 397 times
Version: 2.0
Category: How-tos

Getting information from the current locale

Created 11 months ago by CeBe, updated 11 months 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: 8 973 times
Version: 2.0
Category: How-tos

How to implement form events

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

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

Created 4 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: 73 541 times
Version: 2.0
Category: Tutorials