Laravel Write Logs to Custom Files

When you create a worker application or any large application in Laravel you might want to keep track of logs. It might be necessary to save logs to different files to keep things clean. But by default Laravel Log System doesn’t provide this feature. We can save to different files based on date, but notMore

Drupal Save Profile Image Programmatically

When we use Profile 2 module and need to save the profile image field (existing), we can use profile2 functions and achieve the task. Note down the Field needs to be updated. Load the profile. Add Image field to the loaded profile object Save the profile. function save_image_profile2($profile_id, $image_id){ // Load the profile object $profile = profile2_load($profile_id);More

WooCommerce API Custom Endpoint

WooCommerce is great. But when it comes to API, it requires a little work to do some modifications. Let us take an example of custom endpoints. To make your own woocommerce api endpoint to return custom content, follow this tutorial. Create your own plugin. WordPress Docs will help you achieve this In plugins main fileMore