Wiki articles

Showing 1-20 of 157 items.

How to email error logs to developer on Yii2 apps

Created a year ago by Gabriel A. López López.

Logging is a very important feature of the application. It let's you know what is happening in every moment. By default, Yii2 basic and advanced application have just a \yii\log\FileTarget target configured.

1 0
2 followers
Viewed: 13 838 times
Version: 2.0
Category: How-tos
Tags: email, log

How to redirect all emails to one inbox on Yii2 applications

Created a year ago by 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.

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

Update and Delete buttons on Breadcrumb

Created 3 years ago by Daniel.

The definition of breadcrumbs according to its documentation is as follow: Breadcrumbs displays a list of links indicating the position of the current page in the whole site hierarchy.

0 0
1 follower
Viewed: 50 874 times
Version: 2.0
Category: Tips

How to add Open Graph and Twitter Card tags to Yii2 website.

Created a year ago by Gabriel A. López López.

OpenGraph and Twitter Cards are two metadata sets that allow to describe web pages and make it more understandable for Facebook and Twitter respectively.

2 0
2 followers
Viewed: 13 564 times
Version: 2.0
Category: How-tos

Auto-update denormalized attributes with MongoDb and Yii2

Created 7 years ago by edoardo849, updated 7 years ago by 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: 14 836 times
Version: 2.0
Category: Tips

MongoDb's embedded documents mapping for ActiveRecord in Yii2

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

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

4 0
7 followers
Viewed: 23 405 times
Version: 2.0
Category: How-tos
10 0
15 followers
Viewed: 37 390 times
Version: all
Category: Others

Tunneling using SSH in a limited enviroment

Created 7 years ago by nineinchnick, updated 7 years ago by CeBe.

This tutorial describes how to connect to a remote service via tunnel when only most basic software is available on the remote server. It is not directly related to Yii. It could be hovewer useful for web developers working with shared hosting sites with limited access.

1 0
3 followers
Viewed: 14 523 times
Version: all
Category: Others

Integrating ZF2 into Yii - use case demonstrated

Created 8 years ago by Boaz, updated 7 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: 11 795 times
Version: 2.0
Category: How-tos

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

Created 8 years ago by Charles R. Portwood II, updated 7 years ago by 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: 273 197 times
Version: 2.0
Category: Tutorials

How to implement cron in Yii 2

Created 7 years ago by hemc, updated 7 years ago by 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: 88 013 times
Version: 2.0
Category: How-tos
Tags: console, cron, yii2

Automatic Parameter Binding to POST vars in Yii2

Created 8 years ago by aarondfrancis, updated 7 years ago by YiiJeka.

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

0 0
4 followers
Viewed: 22 155 times
Version: 2.0
Category: How-tos

How to use BootstrapInterface

Created 7 years ago by Antonio Ramirez, updated 7 years ago by 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: 16 753 times
Version: 2.0
Category: How-tos

Displaying, Sorting and Filtering Model Relations on a GridView

Created 7 years ago by Antonio Ramirez, updated 7 years ago by 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.

42 0
35 followers
Viewed: 297 312 times
Version: 2.0
Category: How-tos

Cómo enviar emails usando SMTP

Created 7 years ago by robregonm, updated 7 years ago by robregonm.
2 0
2 followers
Viewed: 24 675 times
Version: 2.0
Category: How-tos

Yii2 default values for Index data Provider

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

Guys,

2 0
5 followers
Viewed: 28 848 times
Version: 2.0
Category: Tips

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

Created 7 years ago by Kartik V, updated 7 years ago by 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: 39 822 times
Version: 2.0
Category: Tutorials

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

Created 7 years ago by Kartik V, updated 7 years ago by 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:

0 2
40 followers
Viewed: 38 844 times
Version: 2.0
Category: FAQs

FORM with GET method causes repeated stacking of URL Parameters

Created 7 years ago by Kartik V, updated 7 years ago by 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(); `

5 2
40 followers
Viewed: 54 722 times
Version: all
Category: Tips

My Own Components Folder in Yii2

Created 7 years ago by CTala, updated 7 years ago by 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: 17 100 times
Version: 2.0
Category: Tips