Articles

News and updates that you might be interested in reading.

packagist.phpcomposer json could not be downloaded error in Laravel solution

I had encountered an issue on composer when I am installing a package in Laravel via composer, then it just hangs or stops on the line:Updating dependencies (including require-dev) and is returning errors like: The “https://packagist.phpcomposer.com/[…..].json” file could not be downloaded (HTTP 1.1 404 Not Found) I had run composer clear-cache and composer diagnose to Read more about packagist.phpcomposer json could not be downloaded error in Laravel solution[…]

DOMPDF not rendering text underline correctly FIX solution

I had encountered a bug in DOMPDF with the underline overlapping the text when I am using a custom font. The fix is quite simple, open the src/Renderer/Text.php file of your dompdf installation and adjust (increase) the value of UNDERLINE_OFFSET constant until the underline position the text has correctly placed underneath the text. const UNDERLINE_OFFSET Read more about DOMPDF not rendering text underline correctly FIX solution[…]

How to install PhpSpreadsheet in Laravel

Before, I am using PHPExcel library to create, parse, and manipulate excel and csv files in Laravel. However, the project was officially deprecated in 2017 and permanently archived in 2019. The authors recommended migrating to PhpSpreadsheet as an alternative. Most of the functions of PhpSpreadsheet is similar to PHPExcel so it’s easy to transition between Read more about How to install PhpSpreadsheet in Laravel[…]

Laravel Database Query Builder insertGetId() method always returning 2147483647

When you are using Laravel insertGetId() method to insert a record and retrieve the ID and is consistently 2147483647 value, but when you check the database it is not the normal value you would expect, it is because your PHP is running in 32bit mode and the range of the int value on this mode Read more about Laravel Database Query Builder insertGetId() method always returning 2147483647[…]

How to update Magento order status and state using REST API and PHP

Here’s a snippet on how to update your Magento order status (or/and state) using Magento’s REST API and PHP via cURL. function sign($method, $url, $data, $consumerSecret, $tokenSecret) { $url = urlEncodeAsZend($url); $data = urlEncodeAsZend(http_build_query($data, ”, ‘&’)); $data = implode(‘&’, [$method, $url, $data]); $secret = implode(‘&’, [$consumerSecret, $tokenSecret]); return base64_encode(hash_hmac(‘sha1’, $data, $secret, true)); } function urlEncodeAsZend($value) Read more about How to update Magento order status and state using REST API and PHP[…]

DFA Passport Appointment Calendar tool by NetPinoy

NetPinoy has just launched an online realtime Department of Foreign Affairs Passport Appointment Calendar tool that can let you see DFA branches which have available dates for passport application and renewal appointment. You will be presented with a calendar layout page where you can see at first glance which DFA branches have the available dates. Read more about DFA Passport Appointment Calendar tool by NetPinoy[…]

BCRemit Money Transfer from UK to Philippines review

My experience with the new BCRemit Money Transfer from UK to Philippines is great. The exchange rate is very competitive and the transfer rates are very low compared to other money transfer facilities. Currently they are only processing from UK to Philippines, Great Britain pound to Philippines peso, but hopefully they can cater to other Read more about BCRemit Money Transfer from UK to Philippines review[…]

Cebu Pacific Air Flight 5J 461 veered off runway incident

Cebu Pacific Air Flight 5J 461 from Manila going to Iloilo veered to the side of runway after landing at the Iloilo International Airport at around 11pm October 14, 2017. The aircraft is carrying 180 passengers and 6 crews are safe. Due to this incident, Iloilo International Airport has been closed temporarily. Flights that are Read more about Cebu Pacific Air Flight 5J 461 veered off runway incident[…]