Wiki articles

Showing 101-120 of 166 items.

PHP built-in server integration

Created 10 years ago by Headshaker Headshaker, updated 10 years ago by Headshaker Headshaker.

I was playing around with another PHP framework which I didn't really liked anyway but it had simple and nice integration for PHP built in web server so I decided to write one for Yii (since this is my primary PHP framework)

1 0
3 followers
Viewed: 60 863 times
Version: 2.0
Category: How-tos
5 0
4 followers
Viewed: 62 781 times
Version: 2.0
Category: How-tos

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 9 years ago by softark softark, updated 6 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: 63 132 times
Version: 2.0
Category: Tutorials

Handling tabular data loading and validation in Yii 2

Created 11 years ago by Kartik V Kartik V, updated 9 years ago by Said Bakr Said Bakr.

The only differences in Yii 2 is that its much simpler due to available functions in the Model class for loading and validating models.

3 2
51 followers
Viewed: 63 593 times
Version: 2.0
Category: Tutorials

Events registration examples

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

Register an event handler at Object-Level

2 0
2 followers
Viewed: 64 999 times
Version: 2.0
Category: How-tos
Tags: events, yii2

FORM with GET method causes repeated stacking of URL Parameters

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

7 2
41 followers
Viewed: 65 558 times
Version: all
Category: Tips

Displaying uploaded file from DB for update with FileInput widget

Created 11 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V Kartik V.

This is for folks who are using \kartik\widgets\FileInput to upload files from your client. How do you display an image for update after you have uploaded it to the server using the widget?

2 3
43 followers
Viewed: 65 566 times
Version: 2.0
Category: How-tos

Relational data fields display and edit with the yii2-detail-view extension

Created 11 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V Kartik V.

If you have read this wiki you would be aware of the yii2-detail-view extension and how it offers you an easy way to EDIT and VIEW your model data, toggle these modes, and other features. You can [read the extension documentation](http://demos....

4 0
41 followers
Viewed: 67 112 times
Version: 2.0
Category: Tutorials

Adding Yii Search to Your Browser Search Box

Created 15 years ago by qiang qiang, updated 7 years ago by CeBe CeBe.

The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.

25 0
6 followers
Viewed: 68 071 times
Version: all
Category: Tips

Book Has Author - Many to Many relations using Kartik\Select2

Created 11 years ago by thiagoc7 thiagoc7, updated 11 years ago by thiagoc7 thiagoc7.

I could make this work following same useful tips from this post.

0 0
6 followers
Viewed: 68 374 times
Version: 2.0
Category: How-tos

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

Created 11 years ago by Kartik V Kartik V, updated 7 years ago by alrazi alrazi.

Step 1: Initialize the Bootstrap Tooltip & Popover plugins in your view layout file @web\views\layouts\main.php. Add this to somewhere in the beginning head section (after you have loaded the Jquery using your AppAsset or something similar).

3 3
48 followers
Viewed: 69 350 times
Version: 2.0
Category: Tips

YII2: Create console commands inside a module or extension

Created 10 years ago by MetaCrawler MetaCrawler, updated 7 years ago by Luis Armando Luis Armando.

Here is a small guide how to get console commands running inside modules & extensions. For this guide I used a fresh yii2 basic application template.

8 0
6 followers
Viewed: 70 508 times
Version: 2.0
Category: Tutorials

Api of Multiple File Uploading in Yii2

Created 5 years ago by fezzymalek fezzymalek, updated 3 years ago by fezzymalek fezzymalek.

After getting lot's of error and don't know how to perform multiple images api in yii2 finally I get it today

5 0
4 followers
Viewed: 71 346 times
Version: 2.0
Category: Tutorials

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

Created 6 years ago by grigori grigori, updated 5 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: 71 654 times
Version: 2.0
Category: How-tos

Yii2 RESTful API with OAuth 2.0

Created 8 years ago by sirin k sirin k, updated 7 years ago by sirin k sirin k.

https://cdn.pbrd.co/images/GMN5ROs.jpg

3 0
3 followers
Viewed: 74 431 times
Version: 2.0
Category: Tutorials

Filter & Sort by Summary Data in GridView Yii 2.0

Created 11 years ago by Kartik V Kartik V, updated 11 years ago by Kartik V Kartik V.

This wiki explains how to add summary data from related models into your Yii Framework 2.0 gridview with filtering and sorting by the summary columns.

5 2
48 followers
Viewed: 75 616 times
Version: 2.0
Category: Tutorials

Interview Questions For YII2

Created 3 years ago by aayushmhu aayushmhu, updated 8 months ago by aayushmhu aayushmhu.

Hey Everyone, In this post I Just shared my Experience what most of interviewer ask in YII2 Interview.

2 0
2 followers
Viewed: 78 052 times
Version: 2.0
Category: Tips
Tags: interview

How to login from different tables in Yii2

Created 7 years ago by AndroideLP AndroideLP, updated 5 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: 78 582 times
Version: 2.0
Category: How-tos

Step by step for how to full export Yii2 grid to excel

Created 11 years ago by Scott_Huang Scott_Huang, updated 11 years ago by Scott_Huang Scott_Huang.

We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:

1 0
5 followers
Viewed: 79 153 times
Version: 2.0
Category: Tips

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: 80 332 times
Version: 2.0
Category: How-tos
Tags: database