Wiki

Sorted by viewsX
Displaying 521-530 of 783 result(s).

How to get & store Last Login DateTime in database?

Created 2 years ago by Rohit SutharHow-tos2 comments – viewed 12,514 times – ( +7 ) – version 1.1
In this wiki I will show how could be store last login date & time in database. First we need a field LastLoginTime (Type must be datetime). this field store a user login detalis (like - Date & Time).

How to catch and log MySQL deadlock errors

Created 5 years ago by sebTips1 comment – viewed 12,448 times – ( +4 ) – version 1.1
This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.
tags: database

MongoDb's embedded documents mapping for ActiveRecord in Yii2

Created 3 years ago by edoardo849How-tos2 comments – viewed 12,416 times – ( +6 ) – version 2.0
You are working with MongoDb and you have embedded documents in your collection that you want to easily map in your Model for CRUD operations.

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

Created 2 years ago by Antonio RamirezHow-tos2 comments – viewed 12,372 times – ( +4 ) – version 2.0
This tutorial is not about allowing users to sign into your application by using any of the OAuth providers available with the official yii2-authclient extension, it is about how to interact with your Twitter account, the one you set for your Yii2 app to promote your site, using the Single Access Token technique.

ChromePHP for Yii

Created 6 years ago by imeheszTips0 comments – viewed 12,320 times – ( +3 / -2 ) – version 1.1
ChromePHP is a console logging extension for Google Chrome.

Update specific cgridview html row after AJAX request

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos3 comments – viewed 12,271 times – ( +2 ) – version 1.1
After of model update (successfull or not) throught CGridView (check the below link) you probably need to updates the specific row html in cgridview (not entire cgridview)

Display image on CGridView column and open a fancy-box

Created 3 years ago by Ankit ModiTutorials0 comments – viewed 12,248 times – ( +1 / -1 )
1) Add a fancy-box extension on admin page

Rendering a view file in a console application

Created 5 years ago by TompiHow-tos1 comment – viewed 12,128 times – ( +4 / -2 ) – version 1.1
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.

How to customize error handling in console-mode applications

Created 6 years ago by Steve FriedlHow-tos1 comment – viewed 12,093 times – ( +3 ) – version 1.1
One can control the detail of a web application in the webroot/index.php file by manipulating the values of YII_DEBUG and YII_TRACE_LEVEL, but these don't appear to be used by console applications. This is because although the base CApplication class defines a displayError() method that does consider these variable, CConsoleApplication overrides it with a function that doesn't honor them.

An important tip when you are using CArrayDataProvider.

Created 4 years ago by sirin kTips0 comments – viewed 12,093 times – ( +8 / -1 ) – version 1.1
Yii ‘s CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an error like “yourmodel.id is not defined”.