Laravel SMS gateway

March 18, 2019 Iyngaran Iyathurai 1

It is a Laravel package which will serve as gateway to send SMS through various providers. It supports multiple sms gateways, and easily extendable to support new gateways. Installing the SMS gateway After install follow one of these steps: Run the command php artisan vendor:publish to publish the extension. It will also copy the sms_gateway.php into the config folder of your laravel application. If the sms_gateway.php file does not exists in your application config folder, just copy the entire file and […]

Useful direct SQL queries for Magento 2 developers

February 14, 2018 Iyngaran Iyathurai 0

Select product default Attribute set id

  Select product Attribute Group Id by using attribute_group_code and Attribute Set ID

  Update attribute_group_id for product attribute

  Update sort_order for product attribute

  Delete a custom attribute using entity_type_id and attribute_code. Delete a custom attribute using entity_type_id and attribute_code.  For this example, I am going to delete a product attribute, which has  attribute_code as ‘iyn_product_option’. To delete a custom attribute, we need to […]

Build Multi-lingual application with the Zend Framework

October 21, 2017 Iyngaran Iyathurai 0

We can not imagine a modern web application without a multi language support. I will show you how easy it is to setup usage of multiple languages in Zend Framework and how to setup some basic language routes (handy for SEO stuff). The Zend Framework offers many ways for you to store your translated strings. It could be an array, a CSV or XML file or you could use gettext which we will be using […]

Configure PHP Remote Debugging in Vagrant box with Xdebug and PhpStorm

July 8, 2017 Iyngaran Iyathurai 0

Note: This article concerns PHP 7.0,PhpStorm 2017.2 (EAP) and Vagrant box bento/centos-7.2. Step1: Install Xdebug on your Vagrant virtual machine You need to have Xdebug installed on your virtual machine to benefit from its services.

Then, we need configure it: We need enable the remote debug and add IDEKEY on XDEBUG. To do that, we need modify the php-xdebug configuration file (xdebug.ini). Lets modify the php-xdebug configuration file

And the following lines at […]

Split time slots between start time and end time in PHP

July 8, 2015 Iyngaran Iyathurai 8

Creating time between start time and end time in interval of 30 Minutes in PHP

Test it now


Calculate distance between two locations by Latitude and Longitude

May 22, 2015 Iyngaran Iyathurai 0

The following code returns the distance between to locations based on each point’s longitude and latitude. Passed to function: lat1, lon1 = Latitude and Longitude of point 1 (in decimal degrees) lat2, lon2 = Latitude and Longitude of point 2 (in decimal degrees) unit = the unit you desire for results where: ‘M’ is statute miles (default) ‘K’ is kilometers ‘N’ is nautical miles   PHP Code


Reference Links  

UTF8 Problem, incorrect display of special characters… (é, É, å, ä, ö etc.)

May 4, 2014 Iyngaran Iyathurai 0

Are you still facing problem, when display the special characters…(£,é, É, å, ä, ö etc.) ? Here is the solution to fix the issue. Firstly, make sure that your database table is set to character set UTF-8. So you must create the database, with UTF-8 encoding. Create a new database, with UTF-8 encoding

Or If you have created the database already, you need to convert it to UTF-8 encoding First, backup! and alter the […]

PHP – Get Latitude/Longitude From an Address with Google Map

March 13, 2014 Iyngaran Iyathurai 4

The  following PHP code convert an address to geocode Latitude/Longitude positioning with Google Maps.

How to check if an email address exists without sending an email?

October 29, 2013 Iyngaran Iyathurai 4

We have all been doing email address validation for a very long time to make sure that the email is correctly formatted. This is to avoid users entering wrongly formatted email address but still they can accidentally give us a wrong email address. Example of a correctly formatted email address but still wrong:[VALID format but does not exist] So is there a QUICK solution to really check the email without sending a test message […]

How to enable PHP error logging via .htaccess

October 10, 2011 Iyngaran Iyathurai 0

Tracking PHP errors is a must when troubleshooting unexpected issues, related to plugins, themes. But you don’t want to have them visible on your site, especially not your customers. Here is a tutorial how to log all PHP errors behind the scenes to a private file. Tracking your site’s PHP errors is an excellent way to manage and troubleshoot unexpected issues related to plugins and themes. Even better, monitoring PHP errors behind the scenes via […]