DB Migration – To change schema of a table

Command:

Migration Class:

 

Generate Facebook Product Catalog Feed (XML)

Facebook Doc: https://developers.facebook.com/docs/marketing-api/dynamic-product-ads/product-catalog#feed-format

CodeIgniter XML Helper:

Sample Code:

 

Useful Javascript Functions

 

MultiCharts資料整理

程式/文件下載: http://www.multicharts.com.tw/MCDownLoad.aspx

Sample Code

 

API Control Vimeo videos (play and mute) with Flex slider

Plugin: https://github.com/tanepiper/vimeo-froogaloop2/tree/master/javascript

 

SendGrid API Example

Doc: https://github.com/sendgrid/sendgrid-php

Complete example:
https://github.com/sendgrid/sendgrid-php/blob/master/USE_CASES.md#attachments

Example:

 

TCPDF

Doc: https://tcpdf.org/docs/srcdoc/tcpdf/class-TCPDF/

Note:

  • HTML裡面的圖片網址一定要是完整路徑,不能是localhost, 否則輸出會有”unable to get the size of the image” error
    crontab執行的時候,base_url()就是抓到localhost,所以要注意

Example:

 

Reference:

Localization of datatable

Localization file:

Sample code:

Display priority:

  1. Localization file
  2. paginate option
  3. aria

Reference: