Category: PHP

Laravel 5 tricks (rough for me)

LaravelPHP

I need these few thing when I am working on Laravel 5. You can add more by comment..   How to install packages by composer ————————————————– adding a package: composer require vendor_name/package_name removing a package: composer remove vendor_name/package_name adding form and html package: —————————– composer require illuminate/html for pdf package (reporting: generating pdf): ——————————————- composer ….  Read More

How to add a new (About Us) Page in Oscommerce 2.3.3

osCommercePHPCreate custom pages on osCommerceeCommerceNew page on osCommerceosCommerce addonskpaulskpaul82

Nowadays I am working on osCommerce and I need to create a new/custom About Us page for company profile but I don’t get any option in admin panel. Surprisingly there is no option to manage pages like About Us, Terms and Condition, Privacy Policy and etc. Even you can’t create a new menu from admin ….  Read More

How to find src attribute of image tag in php?

PHPRegexextracthtmlimageimage srcimgphpregexsk_paulskpaul82

In my case, I had a string containing exactly one <img /> tag (and no other markup). And I was trying to get the src attribute. // get the featured image $image = ‘<img src=”path/to/image_file” />’; // get the src for that image $pattern = ‘/src=”([^”]*)”/’; preg_match($pattern, $image, $matches); $src = $matches[1]; unset($matches); In the ….  Read More