Wiki articles in category How-tos tagged with "yii2"

Showing 1-20 of 46 items.

How to redirect all emails to one inbox on Yii2 applications

Created 5 years ago by Gabriel A. L贸pez L贸pez 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: 128 640 times
Version: 2.0
Category: How-tos

MongoDb's embedded documents mapping for ActiveRecord in Yii2

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

suppose to have in Mongo a collection "user" like:

4 0
7 followers
Viewed: 31 623 times
Version: 2.0
Category: How-tos

How to implement cron in Yii 2

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

In advance template there is already a file yii. And there is no need to run it as php, it is Linux script.

3 0
13 followers
Viewed: 106 568 times
Version: 2.0
Category: How-tos
Tags: console, cron, yii2

Automatic Parameter Binding to POST vars in Yii2

Created 12 years ago by aarondfrancis aarondfrancis, updated 11 years ago by YiiJeka YiiJeka.

I wrote about this on my blog, but wanted to post it here too.

0 0
4 followers
Viewed: 27 995 times
Version: 2.0
Category: How-tos

How to use BootstrapInterface

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

Yii2 introduces the BootstrapInterface聽to ease our application initialization tasks, whether they are composer based or Application bootstrap (do not mistaken with Bootstrap CSS Framework) based tasks. On this article, I am going to explain how to use it on y...

2 0
3 followers
Viewed: 22 406 times
Version: 2.0
Category: How-tos

Displaying, Sorting and Filtering Model Relations on a GridView

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

One of the things you will find tricky to implement is the the sorting and filtering of a GridView's column that displays related model data.

49 0
37 followers
Viewed: 347 714 times
Version: 2.0
Category: How-tos

C贸mo enviar emails usando SMTP

Created 11 years ago by robregonm robregonm, updated 11 years ago by robregonm robregonm.
2 0
2 followers
Viewed: 36 723 times
Version: 2.0
Category: How-tos

Managing a star rating with the StarRating widget in Yii 2

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

In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

1 3
41 followers
Viewed: 27 506 times
Version: 2.0
Category: How-tos

Using the yii2-datecontrol extension along with yii2-detail-view widget

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

The yii2-datecontrol extension allows you to control separate date formats for display and saving for form inputs.

1 0
37 followers
Viewed: 23 666 times
Version: 2.0
Category: How-tos

Displaying uploaded file from DB for update with FileInput widget

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

This is for folks who are using \kartik\widgets\FileInput to upload files from your client. How do you display an image for update after you have uploaded it to the server using the widget?

2 3
43 followers
Viewed: 65 847 times
Version: 2.0
Category: How-tos

Yii2 and Pdf files with Mpdf

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

I am still new to composer and packagist, so I want to share how I am creating the pdf files because for me was not as simple as it should be.

3 0
8 followers
Viewed: 34 622 times
Version: 2.0
Category: How-tos

Book Has Author - Many to Many relations using Kartik\Select2

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

I could make this work following same useful tips from this post.

0 0
6 followers
Viewed: 68 544 times
Version: 2.0
Category: How-tos

Managing different Bootstrap form layouts with yii2-field-range extension.

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

This wiki will explain how you can use the Field range extension with multiple Bootstrap form layouts (vertical or horizontal). You maybe aware, that the yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.

0 0
37 followers
Viewed: 35 196 times
Version: 2.0
Category: How-tos

How to use yii2-authclient to communicate with Twitter using Single Access Token

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

It is quite simple, but I am sure this small tutorial will help more than one of you out there :)

2 0
4 followers
Viewed: 27 718 times
Version: 2.0
Category: How-tos

Nested inline active fields inside Bootstrap horizontal forms

Created 11 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V 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: 60 477 times
Version: 2.0
Category: How-tos

Role Management

Created 11 years ago by Dency G B Dency G B, updated 11 years ago by Dency G B Dency G B.

Implementing a role based access control is a very easy process and you can even load your roles from the database if you want.

0 0
5 followers
Viewed: 27 247 times
Version: 2.0
Category: How-tos
Tags: rbac, yii2

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 074 times
Version: 2.0
Category: How-tos
Tags: mongodb, rbac, yii2
0 0
5 followers
Viewed: 49 129 times
Version: 2.0
Category: How-tos

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

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