Wiki articles

Showing 1-20 of 826 items.

How to email error logs to developer on Yii2 apps

Created 5 years ago by Gabriel A. López López 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.

2 0
4 followers
Viewed: 94 588 times
Version: 2.0
Category: How-tos
Tags: email, log

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: 135 802 times
Version: 2.0
Category: How-tos

Aadhar Number Validator

Created 3 years ago by shiv shiv.

In India have Aadhar number an we may need to valid it a input. So I created a validator for yii2

2 2
1 follower
Viewed: 117 406 times
Version: 2.0
Category: Tips
Tags: validator

GridView show sum of columns in footer.

Created 3 years ago by shiv shiv.

GridView show sum of columns in footer `PHP use yii\grid\DataColumn;

2 0
1 follower
Viewed: 121 373 times
Version: 2.0
Category: Tips

How to Create and Use Validator Using Regular expressions

Created 3 years ago by aayushmhu aayushmhu.

There are Multiple Ways to Create a Validator But here we use Regular Expression or JavaScript Regular Expression or RegExp for Creation Validators. In this article, we will see the most Frequently Used Expression

4 0
1 follower
Viewed: 150 565 times
Version: 2.0
Category: How-tos

Building Modern SPAs with Yii2 and Inertia.js

Created 5 months ago by Akshay Joshi Akshay Joshi.

Inertia.js is a modern approach to building single-page applications (SPAs) without the complexity of building an API. It allows you to use modern JavaScript frameworks like React, Vue, or Svelte while keeping your Yii2 controllers and routing intact.

4 0
2 followers
Viewed: 32 852 times
Version: 2.0
Category: Tutorials
Tags:

Update and Delete buttons on Breadcrumb

Created 7 years ago by Daniel 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.

1 0
1 follower
Viewed: 56 392 times
Version: 2.0
Category: Tips

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

Created 5 years ago by Gabriel A. López López 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
3 followers
Viewed: 108 004 times
Version: 2.0
Category: How-tos

Q: My yiic tool cannot run model and crud commands. Why?

Created 17 years ago by qiang qiang, updated 17 years ago by mishhh mishhh.

Some PHP installations may use a different php.ini file for CLI PHP (command line PHP parser). As a result, when running the model or crud command in yiic shell, you may encounter errors like "YiiBase::include(PDO.php): failed to open stream..." or "...could not find driver", even though the requirement checker confirms you have PDO and the corresponding database driver.

0 0
1 follower
Viewed: 18 564 times
Version: 1.1
Category: Tutorials
Tags:

Integrating with other frameworks

Created 16 years ago by KJedi KJedi, updated 16 years ago by KJedi KJedi.

When you need to integrate with other frameworks (e.g. Zend Framework), you have to follow these steps:

4 1
7 followers
Viewed: 30 373 times
Version: 1.1
Category: Tutorials
Tags:

How to make customizable Db Table prefixes using ActiveRecord

Created 16 years ago by killermonk killermonk, updated 16 years ago by killermonk killermonk.

Yii's ActiveRecord classes are powerful, but they fall short when you want to have a configurable table prefix for your application.

0 0
1 follower
Viewed: 27 208 times
Version: 1.1
Category: Tutorials
Tags:

XSS safe model content

Created 16 years ago by phiras phiras, updated 16 years ago by phiras phiras.

In this post I am going to describe a solution to make your yii-based web application safe from illegal content injections.

4 0
1 follower
Viewed: 14 654 times
Version: 1.1
Category: Tutorials
Tags:

Simplified meta tags

Created 16 years ago by Y!! Y!!, updated 15 years ago by Y!! Y!!.

If we want to set meta tags on a per page (controller-action) basis, we may use the clientScript application component.

13 0
17 followers
Viewed: 61 257 times
Version: 1.1
Category: Tutorials
Tags:

Using CJuiDialog to display flash Messages in Dialogues

Created 15 years ago by thyseus thyseus, updated 15 years ago by thyseus thyseus.

In order to nicely display flash Messages, create view like this called views/site/dialog.php :

10 0
9 followers
Viewed: 30 948 times
Version: 1.1
Category: Tutorials
Tags:

List with multiple checkbox

Created 15 years ago by matkaz matkaz, updated 15 years ago by matkaz matkaz.

It is a common case coders often come accross. For example the purpose of these checkbox is to mark records to be deleted

4 0
8 followers
Viewed: 42 968 times
Version: 1.1
Category: Tutorials
Tags:

How to add an analogue clock widget on your skeleton application

Created 15 years ago by mocapapa mocapapa, updated 15 years ago by mocapapa mocapapa.


Followings are the simple steps to put an analogue clock widget on your skeleton application that is just generated by yiic.

1 0
1 follower
Viewed: 14 707 times
Version: 1.1
Category: Tutorials
Tags:

i18n for your model in just 1 line

Created 16 years ago by mintao mintao, updated 15 years ago by Orteko Orteko.

A simple trick to get the localized version of a model field is to add this little method to your models.

12 0
9 followers
Viewed: 22 643 times
Version: 1.1
Category: Tutorials
Tags: i18n

Installing and configuring the Yii User Management Module under a fresh skeleton application generated by yiic

Created 16 years ago by thyseus thyseus, updated 15 years ago by Orteko Orteko.

p.s. latest version of this tutorial is always available unter the docs/ folder of the User Management Module.

12 2
15 followers
Viewed: 101 707 times
Version: 1.1
Category: Tutorials

SQL Logging and Profiling in FireBug (Yii 1.1)

Created 16 years ago by mindplay mindplay, updated 15 years ago by qiang qiang.

During development, it's often very handy to have SQL logging and profiling.

6 0
6 followers
Viewed: 41 052 times
Version: 1.1
Category: Tutorials
Tags: Logging

Integrating FirePHP

Created 15 years ago by ricardograna ricardograna, updated 15 years ago by ricardograna ricardograna.
  • Install Firebug plugin for Firefox from here.
7 0
6 followers
Viewed: 20 227 times
Version: 1.1
Category: Tutorials
Tags: