Wiki articles

Showing 101-120 of 145 items.

Profiling using XDebug

Created 6 years ago by le_top, updated 4 years ago by le_top.

A short explication on how to extract profile information for PHP on your server using XDebug and KCacheGrind or WinCacheGrind.

3 0
3 followers
Viewed: 15 211 times
Version: all
Category: How-tos

RBAC Super Simple with Admin and User

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

6 1
14 followers
Viewed: 78 987 times
Version: 2.0
Category: Tutorials

Using multiple models in an identity

Created a year ago by samdark, updated 8 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 2
2 followers
Viewed: 17 578 times
Version: 2.0
Category: How-tos

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: 137 978 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: 21 096 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 693 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 204 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 744 times
Version: 2.0
Category: Tutorials

Optimize Scenarios for yii2

Created 2 years ago by AndroideLP, updated 7 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 603 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 786 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 024 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 355 times
Version: 2.0
Category: How-tos

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 379 times
Version: 2.0
Category: Tutorials
Tags: install, rbac, yii2

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

How to login from different tables in Yii2

Created a year ago by AndroideLP, updated 7 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 948 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 170 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 082 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 142 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 791 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 302 times
Version: 2.0
Category: Tutorials