Wiki articles

Showing 21-40 of 826 items.

How to write secure Yii1 applications

Created 14 years ago by François Gannaz François Gannaz, updated 5 years ago by François Gannaz François Gannaz.
  • Validate the user input (see below for details).
  • Protect (escape) your application output according to context (see below for a few output types, mostly HTML and SQL).
  • Test your application in debug mode.
    Set the constant YII_DEBUG to true (by default, it is defined in index.php) and put alongside error_reporting(E_ALL);. Then errors and warnings will stop the execution an...
80 0
114 followers
Viewed: 338 499 times
Version: 1.1
Category: How-tos
5 0
4 followers
Viewed: 71 250 times
Version: 2.0
Category: How-tos

How to add Schema.org markup to Yii2 pages

Created 5 years ago by Gabriel A. López López Gabriel A. López López, updated 5 years ago by Gabriel A. López López Gabriel A. López López.

https://schema.org is a markup system that allows to embed structured data on their web pages for use by search engines and other applications. Let's see how to add Schema.org to our pages on Yii2 based websites using JSON-LD.

3 0
3 followers
Viewed: 100 779 times
Version: 2.0
Category: How-tos

Yii Related Sites

Created 15 years ago by jacmoe jacmoe, updated 6 years ago by samdark samdark.

This is a list of blogs, off-site tutorials and other resources about Yii.

31 0
34 followers
Viewed: 107 509 times
Version: 1.1
Category: Others

When to use Active Record

Created 7 years ago by samdark samdark, updated 6 years ago by samdark samdark.

When to use Active Record is a common question among developers, Yii and overall.

13 0
4 followers
Viewed: 56 995 times
Version: all
Category: FAQs

How to login from different tables in Yii2

Created 8 years ago by AndroideLP AndroideLP, updated 6 years ago by lenovo lenovo.

The Problem: Yii2 utilizes by default UserIdentity configured in config/web.php for connection, this object apply one table to authentication ('identityClass' => 'app\panel\models\User'). How to authentication from diferent tables? Solution: Create instances in web.php to uses UserIdentify. eg:

5 0
6 followers
Viewed: 88 958 times
Version: 2.0
Category: How-tos

UUID instead of an auto-increment integer for ID with Active Record

Created 6 years ago by grigori grigori, updated 6 years ago by samdark samdark.

I have an API. It's built with a RESTful extension over Active Record, and some endpoints provide PUT methods to upload files. By a REST design we create an entity with POST /video first, and then upload a video file with PUT /video/{id}/data.

6 0
4 followers
Viewed: 79 173 times
Version: 2.0
Category: How-tos

Yii2 - Upgrading to Bootstrap 4

Created 6 years ago by Richard Pillay Richard Pillay, updated 6 years ago by Richard Pillay Richard Pillay.

Yii2 - Converting from Bootstrap3 to Bootstrap4

12 0
6 followers
Viewed: 121 573 times
Version: 2.0
Category: How-tos

Using Apostle.io to send formatted, trackable emails from Yii applications

Created 12 years ago by MikeT MikeT, updated 6 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.

Apostle provides a nifty facility for sending app-generated, transactional emails from your application including Wordpress-like mail formatting and full tracking (delivery, opening, clicking etc.) of all emails sent. No need to set up email facilities on your app server!

2 1
2 followers
Viewed: 18 715 times
Version: 1.1
Category: How-tos
Tags: email, mail

MailGun Api Wrapper to send emails

Created 11 years ago by VINAY Kr. SHARMA VINAY Kr. SHARMA, updated 6 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.

MailGun.php Class

1 0
2 followers
Viewed: 18 361 times
Version: 1.1
Category: How-tos
Tags: email, mailgun

Upload files in Yii2 with MongoDb and GridFs

Created 12 years ago by edoardo849 edoardo849, updated 6 years ago by pceuropa pceuropa.

Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

6 0
6 followers
Viewed: 44 075 times
Version: 2.0
Category: How-tos

How to learn Yii?!

Created 14 years ago by yJeroen yJeroen, updated 6 years ago by CeBe CeBe.

Here is a step by step To-Do list for Yii beginners. The list is an advice of what tutorials and documentation you can walk through to get a full understanding of the Yii Framework. These can be a help to learn Yii.

17 0
21 followers
Viewed: 130 616 times
Version: all
Category: Tutorials

Optimize Scenarios for yii2

Created 9 years ago by AndroideLP AndroideLP, updated 6 years ago by AndroideLP AndroideLP.

Working with scenarios, with models that can receive many modifications in their rules or structures as development evolves, can create disruptions in the rescue process.

4 0
2 followers
Viewed: 49 868 times
Version: 2.0
Category: Tutorials

Yii for beginners

Created 14 years ago by rackycz rackycz, updated 6 years ago by rackycz rackycz.

Hi. This is first article with my Yii v1 tutorial. I had to split it into 2 articles as there's limited length of texts on Wiki. So once you understand basics, you can read the 2nd article here: Yii for beginners 2.

68 0
75 followers
Viewed: 493 265 times
Version: 1.1
Category: Tutorials

Change default date format in Oracle

Created 6 years ago by lenovo lenovo, updated 6 years ago by samdark samdark.

Default date format in Oracle is DD-MON-RR (25-JAN-18). With that output, we can't using date formatting.

0 0
2 followers
Viewed: 85 687 times
Version: 2.0
Category: How-tos
Tags: database

Move sources to src

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

Yii 3 and many Yii 2 package sources are contained within src directory which is convenient since you have less directories to check.

12 0
5 followers
Viewed: 18 497 times
Version: 2.0
Category: How-tos

How to install Yii 2 advanced on a shared hosting environment

Created 10 years ago by oligalma oligalma, updated 7 years ago by oligalma oligalma.

I've read many comments that it's not possible to install Yii 2 advanced on a shared hosting environment, as it has two webroots. This is partially true.

3 0
2 followers
Viewed: 39 917 times
Version: 2.0
Category: How-tos

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 10 years ago by softark softark, updated 7 years ago by samdark samdark.

It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's very important to know how the Eager Loading approach works in Yii 2. It has changed drastically from that of Yii 1.1, and there are common misunderstandings about it in the community.

11 0
6 followers
Viewed: 66 993 times
Version: 2.0
Category: Tutorials

How to send emails using SMTP

Created 12 years ago by robregonm robregonm, updated 7 years ago by Wade Shuler Wade Shuler.
6 0
11 followers
Viewed: 147 933 times
Version: 2.0
Category: How-tos

Nested Set with Yii2

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

The nested set behaviour is an approach to store hierarchical data in relational databases. For example, if we have many categories for our product or items. One category can be a "parent" for other categories, means that one category consists of more than one category. The model can be drawn using a "tree" model. There are other approaches available but what we will learn in this article is speci...

7 0
3 followers
Viewed: 95 715 times
Version: 2.0
Category: Tutorials