Skip to main content

Posts

Showing posts from June, 2019

print in loop in php easy way

<script type="text/javascript"> function PrintDiv() { var divToPrint = document.getElementById('divToPrint'); var popupWin = window.open('', '_blank', 'width=300,height=300'); popupWin.document.open(); popupWin.document.write('<html><body onload="window.print()">' + divToPrint.innerHTML + '</html>'); popupWin.document.close(); } </script> <div id="divToPrint" style="display:none;"> <div style="width:200px;height:300px;background-color:teal;"> <?php echo $html; ?> </div> </div> <div> <input type="button" value="print" onclick="PrintDiv();" /> </div>

Auto posting on facebook

Reference: https://packagist.org/packages/laravel-notification-channels/facebook-poster https://sujipthapa.co/blog/generating-never-expiring-facebook-page-access-token for image also: https://techanical-atom.com/post-on-facebook-page-via-laravel-notification/?fbclid=IwAR374VsySPcqW2tt78xByxEH1kNNNHX74D-q62Fd-wYr3rzDQ91JA7-4RpA https://sujipthapa.co/blog/automatically-posting-to-facebook-page-via-laravel-notifications sub: https://github.com/alihesari/laravel-social-auto-posting?fbclid=IwAR002Nv3tkonSNiG--FXw2_V9zUhwAsFi8WApfWiUMV-tvCSWQ9-IL5H6g4 Let me explain what i have done here... composer require laravel - notification - channels / facebook - poster inside config/server.php: 'facebook_poster' = > [ 'app_id' = > env ( 'FACEBOOK_APP_ID' ) , 'app_secret' = > env ( 'FACEBOOK_APP_SECRET' ) , 'access_token' = > env ( 'FACEBOOK_ACCESS_TOKEN' ) , ] , Now, create notif