Wiki articles

Showing 61-80 of 166 items.

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 830 times
Version: 2.0
Category: Tips

Easy way to redirect http:\\localhost\yii2-basic to http:\\localhost\yii2-basic\web\index.php

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

First of all, install yii2 basic template according below link:

1 0
5 followers
Viewed: 85 172 times
Version: 2.0
Category: Tips

Remove Byte Order Mark (BOM) from files recursively

Created 12 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz), updated 7 years ago by samdark samdark.

The problem was that all my web applications ran normally on localhost, but on server the Greek characters (or any other no-english characters) displayed with problems.

2 1
7 followers
Viewed: 37 290 times
Version: all
Category: How-tos

My Own Components Folder in Yii2

Created 11 years ago by CTala CTala, updated 11 years ago by CTala 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: 23 488 times
Version: 2.0
Category: Tips

Handling tabular data loading and validation in Yii 2

Created 11 years ago by Kartik V Kartik V, updated 10 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: 64 515 times
Version: 2.0
Category: Tutorials

Using your own forked version of extensions with composer

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

So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:

3 2
40 followers
Viewed: 26 323 times
Version: 2.0
Category: Tutorials

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

Created 12 years ago by Charles R. Portwood II Charles R. Portwood II, updated 11 years ago by Vivek 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: 317 317 times
Version: 2.0
Category: Tutorials

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

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

An example of customizing the Yii GridView is mentioned here. You can easily override Bootstrap or other styling defaults by changing the GridView default options.

4 2
39 followers
Viewed: 60 854 times
Version: 2.0
Category: How-tos

How to send email via Gmail SMTP in Yii2 framework

Created 4 years ago by Bartosz Wójcik Bartosz Wójcik, updated 4 years ago by Bartosz Wójcik Bartosz Wójcik.

One of my sites has been flooded with spam bots and as a result - Gmail gave my mailing domain a bad score and I couldn't send emails to @gmail addresses anymore, not from my email, not from my system, not from any of other domains and websites I host...

3 1
4 followers
Viewed: 107 607 times
Version: 2.0
Category: How-tos

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: 88 452 times
Version: 2.0
Category: How-tos
Tags: email, log

Interview Questions For YII2

Created 3 years ago by aayushmhu aayushmhu, updated 10 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: 79 335 times
Version: 2.0
Category: Tips
Tags: interview

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: 110 737 times
Version: 2.0
Category: Tips

Building Modern SPAs with Yii2 and Inertia.js

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

2 0
1 follower
Viewed: 11 950 times
Version: 2.0
Category: Tutorials
Tags:
2 0
3 followers
Viewed: 39 454 times
Version: 2.0
Category: How-tos

Export query content to excel through any of your controllers, also can set cssClass for header/odd/even rows, auto download

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

To generate excel by query content, and download through any controller. You also can bind cssClass to header/odd/even rows. As for header, you even can set cssClass for each column.

$this->export2excel($excel_content,$excel_file);

in your controller.

2 0
2 followers
Viewed: 28 404 times
Version: 2.0
Category: Tutorials

Language Selector

Created 10 years ago by Programmer Thailand Programmer Thailand, updated 10 years ago by Programmer Thailand Programmer Thailand.

common\components\LanguageSelector.php

<?php
namespace common\components;

2 0
6 followers
Viewed: 19 144 times
Version: 2.0
Category: Tutorials

How to get SEO friendly URL using Model and new getUrl() function

Created 8 years ago by shiv shiv, updated 8 years ago by shiv shiv.

We all need SEO friendly URLs for our projects. its not always good to call route with params so we can generalise it for all models using a common function.

2 0
1 follower
Viewed: 29 587 times
Version: 2.0
Category: How-tos

How to use BootstrapInterface

Created 11 years ago by Antonio Ramirez Antonio Ramirez, updated 11 years ago by Antonio Ramirez 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: 22 627 times
Version: 2.0
Category: How-tos
2 0
2 followers
Viewed: 36 932 times
Version: 2.0
Category: How-tos

Yii2 default values for Index data Provider

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

Guys,

2 0
5 followers
Viewed: 33 955 times
Version: 2.0
Category: Tips