Wiki articles tagged with "yii2"

Showing 1-20 of 85 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

Auto-update denormalized attributes with MongoDb and Yii2

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

You have different collections in MongoDb with de-normalized attributes. As you may know, due to its not-join nature, MongoDb tends to encourage repetition of the same value in different collections (de-normalization). In this MongoDb is opposed to a more SQL-like approach where you usually reference only the ID of the value with a foreign key.

1 0
3 followers
Viewed: 20 856 times
Version: 2.0
Category: Tips

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

Creating a Simple CRUD App With Yii2 (Revised 12/20/2013)

Created 12 years ago by Charles R. Portwood II Charles R. Portwood II, updated 11 years ago by Vivek Vivek.

By popular demand, today I will be revisiting my previous Yii Framework 2 Getting Started Guide and updating it with what is currently available in the Yii Framework 2 Repository. Provide here is an super simple example CRUD application that will help you get started using the framework.

7 6
21 followers
Viewed: 316 647 times
Version: 2.0
Category: Tutorials

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 994 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

Yii2 default values for Index data Provider

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

Guys,

2 0
5 followers
Viewed: 33 851 times
Version: 2.0
Category: Tips

What to do when composer fails to update your vendor packages?

Created 11 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V Kartik V.
  • Running a composer update does not fetch any new packages (even though the source is updated)
  • A specific vendor package never gets updated
  • Facing on and off problems when fetching packages while performing composer update.
  • You ran a composer update earlier, but it was partially done, before you lost network connectivity, and you cannot refresh packages anymore.
0 4
36 followers
Viewed: 53 984 times
Version: 2.0
Category: Tutorials

Overcoming removal of client helpers (e.g. ajaxLink) and ClientScript in Yii 2.0

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

Alternatively, inline assets (JS/CSS) can be registered at runtime from within the View. For example you can clearly simulate the ajaxLink feature using a inline javascript. Its however recommended if you can merge where possible, client code (JS/CSS) into separate JS/CSS files and loaded through the AssetBundle. Note there is no more need of a CClientScript anymore:

1 2
41 followers
Viewed: 47 025 times
Version: 2.0
Category: FAQs

FORM with GET method causes repeated stacking of URL Parameters

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

// In Yii 1.x $form = $this->beginWidget('CActiveForm', [

'id' => 'order-search-form',
'method' => 'get',

]); echo $form->textInput($searchModel, 'id'); echo CHtml::submitButton('Find', ['class' => 'btn btn-primary']); $this->endWidget(); `

7 2
41 followers
Viewed: 66 175 times
Version: all
Category: Tips

My Own Components Folder in Yii2

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

In Yii1 I used to have my own components under the components folder of the structure, now with namespacing this is a little bit different.

2 1
2 followers
Viewed: 23 346 times
Version: 2.0
Category: Tips

Locking your Yii 2 project package versions with composer.lock

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

Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock file in your application root folder.

0 2
37 followers
Viewed: 19 916 times
Version: 2.0
Category: Tips

Install specific Yii2 vendor extension & dependency without updating other packages.

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

The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?

2 3
39 followers
Viewed: 47 556 times
Version: 2.0
Category: Tips

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

How to store array/widget configuration to the database with config validation rules

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

Note the tag {{homeUrl}} will be dynamically replaced at runtime.

2 3
41 followers
Viewed: 27 825 times
Version: 2.0
Category: Tutorials

Managing your nested dropdown dependency with DepDrop widget

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

If you are coming over to Yii 2 from Yii 1.x, you may have already read this useful wiki for creating dependent dropdowns. You can use a similar approach in Yii 2 to do the same. But if you are looking at a prebuilt solution that helps you manage it easier, read along.

2 3
42 followers
Viewed: 93 528 times
Version: 2.0
Category: Tutorials

Filter & Sort by Summary Data in GridView Yii 2.0

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

This wiki explains how to add summary data from related models into your Yii Framework 2.0 gridview with filtering and sorting by the summary columns.

5 2
48 followers
Viewed: 75 877 times
Version: 2.0
Category: Tutorials