php7-logo

PHP 7 : how to Unset all variables

previously I was using the following script in PHP 5.5.9 to unset all variables, which was working very well

but now when i used same code in PHP 7 , this is giving  following messages:

after reading php 7 documentations and some research on… Continue Reading

joi validation examples

best solution to handle HAPI validation errors?

in my project i written below route code for hapi

So when I don’t pass the firstName it throws error like this

Now, I was trying to handle the above error in catch

So i found the best solution… Continue Reading

laravel 5 set timezone

change timezone in laravel database

if you are using any column that is saving date or time using timestamps() or you are inserting / updating time from query.Then you might have problem of timezone.Your hours maybe storing ahead or back of your computer machine.So how you will… Continue Reading

cart total

How to get cart items total in magento 2

i was working on a ecommerce project based on magento 2.In this project i had a requirement where i need cart count in my header.phtml file.So i simply write below code

but after using this i got a php… Continue Reading

1-xml-sitemap

how to generate sitemap in magento 2

if your sitemap is not generated automatically even after using configuration setting in Stores -> Configuration -> Catalog -> XML sitemap  or via CRONJOB. Then can create it manually as well using below steps: login to Magento 2 admin Navigate to… Continue Reading