Wiki articles

Showing 1-20 of 153 items.

How to email error logs to developer on Yii2 apps

Created 7 days 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.

0 0
1 follower
Viewed: 237 times
Version: 2.0
Category: How-tos
Tags: email, log

Update and Delete buttons on Breadcrumb

Created 2 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: 46 049 times
Version: 2.0
Category: Tips

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

Created 12 days 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.

0 0
1 follower
Viewed: 504 times
Version: 2.0
Category: How-tos

Auto-update denormalized attributes with MongoDb and Yii2

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

MongoDb's embedded documents mapping for ActiveRecord in Yii2

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

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

3 0
6 followers
Viewed: 21 569 times
Version: 2.0
Category: How-tos
10 0
15 followers
Viewed: 35 837 times
Version: all
Category: Others

Tunneling using SSH in a limited enviroment

Created 6 years ago by nineinchnick, updated 6 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: 12 793 times
Version: all
Category: Others

Integrating ZF2 into Yii - use case demonstrated

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

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

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

How to implement cron in Yii 2

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

Automatic Parameter Binding to POST vars in Yii2

Created 6 years ago by aarondfrancis, updated 6 years ago by YiiJeka.

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

0 0
4 followers
Viewed: 20 545 times
Version: 2.0
Category: How-tos

How to use BootstrapInterface

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

Displaying, Sorting and Filtering Model Relations on a GridView

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

37 0
32 followers
Viewed: 276 439 times
Version: 2.0
Category: How-tos

Cómo enviar emails usando SMTP

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

Yii2 default values for Index data Provider

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

Guys,

2 0
5 followers
Viewed: 27 029 times
Version: 2.0
Category: Tips

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

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

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

Created 6 years ago by Kartik V, updated 6 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: 36 613 times
Version: 2.0
Category: FAQs

FORM with GET method causes repeated stacking of URL Parameters

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

4 2
40 followers
Viewed: 50 863 times
Version: all
Category: Tips

My Own Components Folder in Yii2

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

Locking your Yii 2 project package versions with composer.lock

Created 6 years ago by Kartik V, updated 6 years ago by 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: 11 490 times
Version: 2.0
Category: Tips